Forums / Addon Language Packs / V158 Japanese language pack

V158 Japanese language pack

Views: 25,539

Results 1 to 20 of 64
27 Nov 2022, 7:36 AM
#1
pilou2 avatar

pilou2

Zen Follower

Join Date:
Jun 2008
Location:
Japan
Posts:
400
Plugin Contributions:
6

V158 Japanese language pack

Hello everybody,

I have just made a Japanese language pack and it has been released in the plugin section:(日本語のv1.5.8言語パックをリリースしました!)
https://www.zen-cart.com/downloads.php?do=file&id=2359
This is an heavy modification of Zen Cart v 1.5.8 (only) but after installing it you should be able to use Japanese in your shop and have name with furigana and addresses properly formated and it includes Japanese shipping modules too for Yamato, Sagawa and Japanese Post.

There are still two 'things to do':
First I plan to make a Japanese version of the Readme explanation file. As I am not so good at explaining in Japanese I will appreciate some help/correction from native speaker. :wink:
Secondly I want to optimize calculation algorythms for parcel size. This is more on the long term for this one.

Please if you try/use it I will appreciate any feedback.
And don't hesitate if you have any questions.
Thanks! 宜しくお願いします。

ZC v2.2.2 PHP 8.4+ MySQL 8.4+

27 Nov 2022, 4:05 PM
#2
brittainmark avatar

brittainmark

Totally Zenned

Join Date:
Apr 2009
Posts:
509
Plugin Contributions:
1

Re: V158 Japanese language pack

Hi @pilou2, we are having a discussion about language packs and wondered if you new pack uses UTF8 character set.

Mark Brittain
http:\innerlightcrystals.co.uk\sales\

27 Nov 2022, 4:20 PM
#3
pilou2 avatar

pilou2

Zen Follower

Join Date:
Jun 2008
Location:
Japan
Posts:
400
Plugin Contributions:
6

Re: V158 Japanese language pack

brittainmark:

Hi @pilou2, we are having a discussion about language packs and wondered if you new pack uses UTF8 character set.

Yes charset is set to utf-8 in language files and files themselves are all utf8 encoded.

ZC v2.2.2 PHP 8.4+ MySQL 8.4+

9 Dec 2022, 3:53 PM
#4
pilou2 avatar

pilou2

Zen Follower

Join Date:
Jun 2008
Location:
Japan
Posts:
400
Plugin Contributions:
6

Re: V158 Japanese language pack

Version 1.1.0 has been released.
It adds local PHP Japanese calendar, which means the era can be displayed in date. For 2022 it is Reiwa 4 (令和4) and it is displayed in admin header date.
I use an extra function for that with default format parameter ```
'r年(Gy年)MMMMd日 EEEE HH:mm:ss ZZZZ'

2022年(令和4年)12月10日 土曜日 00:43:37 GMT+09:00
Enjoy!

ZC v2.2.2 PHP 8.4+ MySQL 8.4+

9 Dec 2022, 4:07 PM
#5
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,720
Plugin Contributions:
56

Re: V158 Japanese language pack

Arigato!

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

14 Jan 2023, 9:14 AM
#6
pilou2 avatar

pilou2

Zen Follower

Join Date:
Jun 2008
Location:
Japan
Posts:
400
Plugin Contributions:
6

Re: V158 Japanese language pack

Version 1.1.6 of Japanese Language Pack is ready for release. Modifications/updates are as follow:

Modified customer.php in admin so that dob field is required or not depending on field length setting in admin like for customer side.
Typo corrections in language files.
Added filter in function zen_get_country_zone to display only Japanese name for Japan zones when in Japanese and English names otherwise.
Updated categories and rates for Japanese Post Class jpparcel.php Renamed all files and variable from jppercel... to jpparcel... which includes module file and language files. Old files named jppercel....something should be deleted:
'...\includes\classes_jppercel.php'
'...\includes\languages\english\modules\shipping\lang.jppercelems.php'
'...\includes\languages\japanese\modules\shipping\lang.jppercelems.php'
'...\includes\modules\shipping\jppercelems.php'

It is already available on Github and should be soon in plugin page.:wink:
https://www.zen-cart.com/downloads.php?do=file&id=2359

ZC v2.2.2 PHP 8.4+ MySQL 8.4+

16 Jan 2023, 11:58 PM
#7
pilou2 avatar

pilou2

Zen Follower

Join Date:
Jun 2008
Location:
Japan
Posts:
400
Plugin Contributions:
6

Re: V158 Japanese language pack

pilou2:

... Old files named jppercel....something should be deleted:
'...\includes\classes_jppercel.php'
'...\includes\languages\english\modules\shipping\lang.jppercelems.php'
'...\includes\languages\japanese\modules\shipping\lang.jppercelems.php'
'...\includes\modules\shipping\jppercelems.php'
...
Please follow this more detailed steps to update to V1.1.6 :

  • After copying all new files, install shipping module jpparcelems with same settings as jppercelems.
  • Uninstall shipping module jppercelems.
  • Delete these files :
    '...\includes\classes_jppercel.php'
    '...\includes\languages\english\modules\shipping\lang.jppercelems.php'
    '...\includes\languages\japanese\modules\shipping\lang.jppercelems.php'
    '...\includes\modules\shipping\jppercelems.php'
    Done!

ZC v2.2.2 PHP 8.4+ MySQL 8.4+

25 Feb 2023, 4:43 AM
#8
pilou2 avatar

pilou2

Zen Follower

Join Date:
Jun 2008
Location:
Japan
Posts:
400
Plugin Contributions:
6

Re: V158 Japanese language pack

Hello A new update (v1.1.8) has been submitted in Plugin area. It should be available soon.
If you can't wait go get it on Github! It is easier there to see which files are new or recently modified.
There are some important bug fix and a new shipping module 'International ePacket'.

ZC v2.2.2 PHP 8.4+ MySQL 8.4+

5 Apr 2023, 8:14 AM
#9
fujimasa avatar

fujimasa

New Zenner

Join Date:
Mar 2023
Posts:
5
Plugin Contributions:
0

Re: V158 Japanese language pack

Hello pilou2,Thanks for the Japanese language pack!
In ZEN-CART v158
I get an error when uploading the "mysql_japanese_install.sql" file in the SQL folder in PhpMyAdmin. Other than that, I can upload the file.
MYSQL message
#住所フォーマット追加 (#Add address format)
INSERT INTO address_format VALUES(21,'$postcode$cr$sate$city$streets$cr$lastname $firstname 様')
#1136-1行目で、列の数が値の数と一致しません。(#1136-In line 1, the number of columns does not match the number of values.)

If I upload the mysql_japanese_install.sql file again.
#注文ステータス (#Order status)
INSERT INTO orders_status VALUES ('5','1' 'Sent',40)
#1062 - '5-1'は索引 'PRIMARY' で重複しています。(#1062 - '5-1' is duplicated in index 'PRIMARY'.)

Next time I upload the contents of ADMIN-JP to the admin folder using FTP software.
When I add a new item I get an error and cannot add it.
I get an error message "If you were entering information, press the BACK button in your browser and re-check the information you If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you entered valid data."
Thanks in advance.

5 Apr 2023, 9:45 AM
#10
pilou2 avatar

pilou2

Zen Follower

Join Date:
Jun 2008
Location:
Japan
Posts:
400
Plugin Contributions:
6

Re: V158 Japanese language pack

I get an error when uploading the "mysql_japanese_install.sql" file in the SQL folder in PhpMyAdmin. Other than that, I can upload the file.
MYSQL message
#住所フォーマット追加 (#Add address format)
INSERT INTO address_format VALUES(21,'$postcode$cr$sate$city$streets$cr$lastname $firstname 様')
#1136-1行目で、列の数が値の数と一致しません。(#1136-In line 1, the number of columns does not match the number of values.)
Fujimasa san, sorry for the mistake. here is the correct sql request:
INSERT INTO address_format VALUES (21, '〒$postcode$cr$state$city$streets$cr$lastname $firstname 様', '$city $country');

But you can't use INSERT two time on same database/table. It is only to add new data. To change existing data the MySQL command 'UPDATE' is used.
When you have an error like that don't upload the whole SQL file again just go to sql tab in phpmyadmin and copy / paste the correct MySQL query there.

Next time I upload the contents of ADMIN-JP to the admin folder using FTP software.
When I add a new item I get an error and cannot add it.
I get an error message "If you were entering information, press the BACK button in your browser and re-check the information you If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you entered valid data."
I am going to check that but a log file would be very helpful. Just after the error happens look in 'logs' folder (in cart root) where a new file should have been created. Please copy and paste the relevant part of this log file.

ZC v2.2.2 PHP 8.4+ MySQL 8.4+

6 Apr 2023, 8:59 AM
#11
fujimasa avatar

fujimasa

New Zenner

Join Date:
Mar 2023
Posts:
5
Plugin Contributions:
0

Re: V158 Japanese language pack

Thanks pilou2 for the quick response.
I rewrote line 21 of the SQL and pasted it in the sql tab, but it did not work.
I reinstalled all of ZEN-CART and pasted "mysql_japanese_install.sql" and no error. Thanks.
The error in line #1136-1 seems to have been caused by a double upload as you suggested.
Now I have no more problems adding products, and the storfront page is displaying well.

I was able to proceed and uploaded 'mysql_japanese_admin_menu.sql' as well.
I uploaded the admin-JP contents to the admin folder using FTP software.
At this time, there was one error that 'myadmin/includes/languages/japanese/images/buttons/button_display.gif' could not be uploaded.

I logged into the admin panel, but it was not in Japanese.
I tried uploading 'mysql_japanese_config.sql' in the SQL folder, and the 'japanese' combo box appeared on the admin screen and I was able to make the admin screen Japanese.

However, when I go to the modules menu to view payment modules, etc,

'Error: Module could not be loaded because the corresponding language file does not exist: /mydomain/myfolder/includes/languages/japanese/modules/modules/payment/authorizenet.php'

'Error: Module could not be loaded because the corresponding language file does not exist: /mydomain/~
I get seme 10 errors, and similar errors for other shipping modules, etc.'

Are there any other files that should be uploaded?

6 Apr 2023, 3:11 PM
#12
pilou2 avatar

pilou2

Zen Follower

Join Date:
Jun 2008
Location:
Japan
Posts:
400
Plugin Contributions:
6

Re: V158 Japanese language pack

fujimasa:

I was able to proceed and uploaded 'mysql_japanese_admin_menu.sql' as well.
I uploaded the admin-JP contents to the admin folder using FTP software.
At this time, there was one error that 'myadmin/includes/languages/japanese/images/buttons/button_display.gif' could not be uploaded.
This is most likely an FTP upload problem, just try to upload this file again.

I logged into the admin panel, but it was not in Japanese.
I tried uploading 'mysql_japanese_config.sql' in the SQL folder, and the 'japanese' combo box appeared on the admin screen and I was able to make the admin screen Japanese.
You have to add Japanese language in admin. But 'mysql_japanese_config.sql' did it for you. I already added explanations in readme file for next release.

However, when I go to the modules menu to view payment modules, etc,

'Error: Module could not be loaded because the corresponding language file does not exist: /mydomain/myfolder/includes/languages/japanese/modules/modules/payment/authorizenet.php'

'Error: Module could not be loaded because the corresponding language file does not exist: /mydomain/~
I get seme 10 errors, and similar errors for other shipping modules, etc.'

Are there any other files that should be uploaded?
These are Zen Cart pre-installed module and I did not do any Japanese version of them because they generally not used in Japan. I will add some more explanation in next release and perhaps include the English version in Japanese folder. This what you have to do to fix it, copy all modules language files that have an error from English folder to Japanese folder mirroring the English folders and files.
In general, if you add modules in the future always add language files in both English and Japanese folders.

ZC v2.2.2 PHP 8.4+ MySQL 8.4+

7 Apr 2023, 12:52 PM
#13
pilou2 avatar

pilou2

Zen Follower

Join Date:
Jun 2008
Location:
Japan
Posts:
400
Plugin Contributions:
6

Re: V158 Japanese language pack

fujimasa:

I was able to proceed and uploaded 'mysql_japanese_admin_menu.sql' as well.
I uploaded the admin-JP contents to the admin folder using FTP software.
At this time, there was one error that 'myadmin/includes/languages/japanese/images/buttons/button_display.gif' could not be uploaded.
This is mostly due to an FTP upload problem. Just try to upload this file again.

I logged into the admin panel, but it was not in Japanese.
I tried uploading 'mysql_japanese_config.sql' in the SQL folder, and the 'japanese' combo box appeared on the admin screen and I was able to make the admin screen Japanese.
You need to add Japanese language as a new language before being able to use it. The 'mysql_japanese_config.sql' file did it for you.

However, when I go to the modules menu to view payment modules, etc,

'Error: Module could not be loaded because the corresponding language file does not exist: /mydomain/myfolder/includes/languages/japanese/modules/modules/payment/authorizenet.php'

'Error: Module could not be loaded because the corresponding language file does not exist: /mydomain/~
I get same 10 errors, and similar errors for other shipping modules, etc.'

Are there any other files that should be uploaded?
All these modules are Zen Cart build-in modules for which there is no Japanese version mainly because they are not used in Japan. They (and any module in general) need a language file for each language installed in Zen Cart. As there is no Japanese version, just copy English language files to Japanese language folder respecting folders organization. I should probably add them to next release or at least add some explanation in readme file.

Thank you for all these feed backs it will help improving this plugin.

ZC v2.2.2 PHP 8.4+ MySQL 8.4+

7 Apr 2023, 2:05 PM
#14
pilou2 avatar

pilou2

Zen Follower

Join Date:
Jun 2008
Location:
Japan
Posts:
400
Plugin Contributions:
6

Re: V158 Japanese language pack

fujimasa:

However, when I go to the modules menu to view payment modules, etc,

'Error: Module could not be loaded because the corresponding language file does not exist: /mydomain/myfolder/includes/languages/japanese/modules/modules/payment/authorizenet.php'

'Error: Module could not be loaded because the corresponding language file does not exist: /mydomain/~
I get seme 10 errors, and similar errors for other shipping modules, etc.'

Are there any other files that should be uploaded?

Actually these files are already translated and included in the pack! Looking at the path, folder 'modules' appears too times in your error message: '/mydomain/myfolder/includes/languages/japanese/modules/modules/payment/authorizenet.php'
I don't know why. Perhaps some problem with upload?
I did a full Japanese version install with the pack on a newly installed Zen Cart 1.58a and there was no problem at all (after correcting the first SQL error).
Please check your folder 'modules' is actually in '..\includes\languages\japanese\modules'.

ZC v2.2.2 PHP 8.4+ MySQL 8.4+

8 Apr 2023, 12:10 PM
#15
pilou2 avatar

pilou2

Zen Follower

Join Date:
Jun 2008
Location:
Japan
Posts:
400
Plugin Contributions:
6

Re: V158 Japanese language pack

To forum Admin.
I have recently three posts that did not make it to the forum on two different threads and then two of them reappeared one or two days later and one is lost at least for now.
Could you have a look please and delete the double post on this thread and this message too after you read it. It seems to happen when I use 'Go Advanced' and 'preview' but not with 'Quick Post'.
Thanks.

ZC v2.2.2 PHP 8.4+ MySQL 8.4+

11 Apr 2023, 12:46 PM
#16
fujimasa avatar

fujimasa

New Zenner

Join Date:
Mar 2023
Posts:
5
Plugin Contributions:
0

Re: V158 Japanese language pack

Hello pilou2!
I had Saturday and Sunday off and Monday to get some work done.

I was able to do the 'myadmin/includes/languages/japanese/images/buttons/button_display.gif' by uploading it again.

I have experimented with various test pages since then, and when I add 'mysql_japanese_config.sql', the Japanese combo box appears, but I get an error on the storefront page.' This page is not working, the domain cannot process this request at this time. HTTP ERROR 500'
If I change the PHP language setting on the server from 8 to 7.4 module mode, the storefront page seems to display. However, it was an incomplete display.

Then I read your reply and tried the following
The "Japanese" folder and the "lang.japanese.php" file in the "ZC158LangPack_JP\includes\languages", I uploaded them to the "/Mydomain/Myfolder/includes/languages" folder on my server.

A combo box appeared where I could switch between Japanese and English. I was able to go to the payment and shipping module tabs and they displayed correctly. Excellent.
' mysql_japanese_config.sql' and the faulty front page now displays correctly.
However, the top page and other displays are now probably from your own page.
The payment methods etc. are also probably the same as on your page.
This helped me understand that I could change the storefront text by changing the text in the folders.

I have not uploaded the Japanese pack for the module, but it now displays correctly. I am going to try to manipulate it in various ways.

11 Apr 2023, 2:37 PM
#17
pilou2 avatar

pilou2

Zen Follower

Join Date:
Jun 2008
Location:
Japan
Posts:
400
Plugin Contributions:
6

Re: V158 Japanese language pack

However, the top page and other displays are now probably from your own page.
The payment methods etc. are also probably the same as on your page.
This helped me understand that I could change the storefront text by changing the text in the folders.
Your are right I need to do some clean up.
To modify these information you do it exactly like an English version. Most of it can be done from admin menu, especially in 'tools->define page editor' but for things like logo you have to edit some files.
Please have a look at documentation, it is English but well done and easy to understand. You could start here:
https://docs.zen-cart.com/user/new_user_topics/

ZC v2.2.2 PHP 8.4+ MySQL 8.4+

11 Apr 2023, 3:03 PM
#18
pilou2 avatar

pilou2

Zen Follower

Join Date:
Jun 2008
Location:
Japan
Posts:
400
Plugin Contributions:
6

Re: V158 Japanese language pack

The only part specific to Japanese that you need to change is the shipping quote in modules for Sagawa, Yamato and Yupack. They depends on where you ship from and if you have a contract or not with these companies.
Files to edit are in 'includes\classes' :
'includes\classes_sagawa.php'
'includes\classes_yamato.php'
'includes\classes_yupack.php'
In function quote there is a big array with all quotes (送料). You need to adjust these if you have a contract. Then below is another array with codes like this 'AC'=>'N04' that define which quote number (N04) to use to send from one area (A) to another (C). I send from Okinawa and quotes (送料) will probably very different for you.
It takes time but you have to do it one time or sometime more when shipping prices increase.
がんばって!

ZC v2.2.2 PHP 8.4+ MySQL 8.4+

13 Apr 2023, 8:57 AM
#19
fujimasa avatar

fujimasa

New Zenner

Join Date:
Mar 2023
Posts:
5
Plugin Contributions:
0

Re: V158 Japanese language pack

Hello pilou2 thanks for everything.
I did the installation in the following order
SQL
mysql_japanese_admin_menu.sql install
mysql_japanese_install.sql install
File
email ,images, includes

At this point, there was no combo box to switch to Japanese on the admin page.
I found that the Japanese combo box appeared only after installing 'mysql_japanese_config.sql'.

I also found
Uploading "ZC158LangPack_JP > includes > templates" seems to cause an error on the storefront page.
That error did not appear in my environment until I closed the browser and reopened it.
The error is on the page where you click on login to register as a new member.
The Submit the Information '送信' button at the bottom of the page disappears.
This probably had something to do with the "template_default" in "includes/templates" on the server.
I tried to avoid affecting "template_default" and switched to another template with the ride-on function, and the button appeared.
It may be just my environment, so please check.

In the Japanese readme, "email", "images", and "includes" are uploaded, but I had the impression that I could also upload them. I think it is the impression of the word "CAN" "出来る" that I can do.

13 Apr 2023, 2:04 PM
#20
pilou2 avatar

pilou2

Zen Follower

Join Date:
Jun 2008
Location:
Japan
Posts:
400
Plugin Contributions:
6

Re: V158 Japanese language pack

fujimasa:

Hello pilou2 thanks for everything.
I did the installation in the following order
SQL
mysql_japanese_admin_menu.sql install
mysql_japanese_install.sql install
File
email ,images, includes

At this point, there was no combo box to switch to Japanese on the admin page.
I found that the Japanese combo box appeared only after installing 'mysql_japanese_config.sql'.
I modified 'mysql_japanese_install.sql' to set Japanese language and make Language Box visible from the beginning.

I also found
Uploading "ZC158LangPack_JP > includes > templates" seems to cause an error on the storefront page.
That error did not appear in my environment until I closed the browser and reopened it.
The error is on the page where you click on login to register as a new member.
The Submit the Information '送信' button at the bottom of the page disappears.
This probably had something to do with the "template_default" in "includes/templates" on the server.
I tried to avoid affecting "template_default" and switched to another template with the ride-on function, and the button appeared.
It may be just my environment, so please check.
Problem is not necessary with template it could be a language constant or a variable that is not found provoking an error 500 on the server. You should have more details in log file in '/logs' folder. I checked here and there was no problem...

In the Japanese readme, "email", "images", and "includes" are uploaded, but I had the impression that I could also upload them. I think it is the impression of the word "CAN" "出来る" that I can do.
I changed it to:
Zen Cart v1.5.8 を更新、プラグイン、またはその他の変更なしで新規インストールした場合は、すべてのストアフロント サイド ファイル(フォルダー:email、images、includes)をカートにコピーして下さい「既存のファイルを上書きします」。
I hope it is better like this.
I have just made a new release v1.2.1 that I sent yesterday to plugin section of Zen Cart site but it takes few days to appear and today' fixes are not included.
But the release v1.2.1 on Github is up to date with correction mentioned in this post:
https://github.com/piloujp/ZenCartv158-Japanese-Language-Pack/releases/tag/v1.2.1

ZC v2.2.2 PHP 8.4+ MySQL 8.4+