Zen Cart Logo
Forums / Addon Language Packs / Future Japanese Language Pack Status, version 1.5.5 and beyond...

Future Japanese Language Pack Status, version 1.5.5 and beyond...

Views: 83,569

Results 1 to 20 of 87
7 Feb 2016, 1:46 AM
#1
peace_freak avatar

peace_freak

Zen Follower

Join Date:
Apr 2006
Posts:
354
Plugin Contributions:
0

Future Japanese Language Pack Status, version 1.5.5 and beyond...

Currently I have an English/Japanese store (version 1.5.4) that works fine with Japanese Language Pack.

Yesterday I began playing around with version 1.5.5 on a new store for an English/Japanese based site. I have not installed any Japanese files yet.

I have not seen any activity surrounding the Japanese Language Pack for a few years so I'm wondering if the current language pack will work in 1.5.5 and upcoming version 1.6 (and beyond!).

Would appreciate an overview of the situation as I need to know if I should stick with Zen or not.

Thanks in advance!

7 Feb 2016, 2:46 AM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Future Japanese Language Pack Status, version 1.5.5 and beyond...

Would appreciate an overview of the situation as I need to know if I should stick with Zen or not.
As you must also speak & write in Japanese - you can edit the english.php replacing English words with Japanese then renaming it to japanese.php and along with other language files.
You could then offer it as a language pack for ZenCart v1.5.5

7 Feb 2016, 12:31 PM
#3
peace_freak avatar

peace_freak

Zen Follower

Join Date:
Apr 2006
Posts:
354
Plugin Contributions:
0

Re: Future Japanese Language Pack Status, version 1.5.5 and beyond...

Actually my Japanese ability is limited but I'll look into it... If the 1.5.5 version is not too different I should be able to handle it.

7 Feb 2016, 1:34 PM
#4
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: Future Japanese Language Pack Status, version 1.5.5 and beyond...

I think there is also a Japanese fork on github of the Zen Cart repository. Not sure is it is actively maintained or up to date.

7 Feb 2016, 4:17 PM
#5
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: Future Japanese Language Pack Status, version 1.5.5 and beyond...

18 Feb 2016, 7:05 AM
#6
cjcraven avatar

cjcraven

Zen Follower

Join Date:
Aug 2004
Location:
Osaka Japan
Posts:
149
Plugin Contributions:
0

Re: Future Japanese Language Pack Status, version 1.5.5 and beyond...

I only have Japanese version 1.5.1, where did you find 1.5.4?

The annoying part I find about ZenCart JP version is the admin configuration menus are fixed in Japanese, they should be multilingual but are not.

18 Feb 2016, 2:12 PM
#7
peace_freak avatar

peace_freak

Zen Follower

Join Date:
Apr 2006
Posts:
354
Plugin Contributions:
0

Re: Future Japanese Language Pack Status, version 1.5.5 and beyond...

I believe my version is 1.5.1, too. Anyway, whatever version it is, it seems to work fine with 1.5.4.

18 Feb 2016, 3:01 PM
#8
peace_freak avatar

peace_freak

Zen Follower

Join Date:
Apr 2006
Posts:
354
Plugin Contributions:
0

Re: Future Japanese Language Pack Status, version 1.5.5 and beyond...

I can choose English or Japanese for the Admin area. I usually download the English version and add the Japanese language files to it...

20 Feb 2016, 2:28 AM
#9
peace_freak avatar

peace_freak

Zen Follower

Join Date:
Apr 2006
Posts:
354
Plugin Contributions:
0

Re: Future Japanese Language Pack Status, version 1.5.5 and beyond...

I've decided to try and update the Japanese Language files to suit version 1.5.5.

I've done a search but can't seem to find specific instructions as to the procedure or a list of files that need to be updated for both the store and the admin.

Could someone point me in the right direction?

Thanks!

20 Feb 2016, 11:23 AM
#10
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Future Japanese Language Pack Status, version 1.5.5 and beyond...

Peace Freak:

I've decided to try and update the Japanese Language files to suit version 1.5.5.

I've done a search but can't seem to find specific instructions as to the procedure or a list of files that need to be updated for both the store and the admin.

Could someone point me in the right direction?

Thanks!

Not sure I'm answering the right question, but all of the language files are in the appiicable languages directories. The action would be as I see it, assuming that the japanese version of the code is or will be the same as the english version of the code, would be to compare the includes/languages folders for all english files against the japanese language pack. Any defines in english not in japanese need to be translated, copied, or moved. Any define in the japanese version not in the english version to also be evaluated for removal/movement.

There is also a plugin I thought that also looks for "multiple" definitions of a constant or something similar to help eliminate "unnecessary" duplication of definitions/identify the "best" location for a single define to be applicable for all cases.

If the japanese version of ZC is or is to be different than the english version then the applicable constants would need to be evaluated for such.

20 Feb 2016, 11:37 AM
#11
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Future Japanese Language Pack Status, version 1.5.5 and beyond...

Further, as I just thought about the actual process, because every define that exists will be different most likely in each case, a process may need to be considered, to ease the comparison... Right? Remember each define line has a constant, followed by the information for that language. And each language is "different". There might be cases where the english and japanese are the same because of cultural acceptance, but one should assume first that they are not.

So, two ways I see to do this and it depends on the capability of the comparison software. Either the comparison is done with something like a regex expression that ignores the second half of the below: ```
define(.,.);

Or 2, a backup copy of each file is made, the file is modified to remove the second part of the expression and the comparison made to identify the missing field(s) as identified in the previous post. This would/could be more like this with a search filter of:

define((.), .);

Replace with:

define($1

Then in case there are comments that follow a define, as part of the comparison, ignore the non-functional/minor differences between files...

Then when a difference is found, the original file is reviewed to evaluate why the difference and what the "statement's" intent is to support translation.

A bit tedious, but a first attempt at a process.
20 Feb 2016, 1:47 PM
#12
peace_freak avatar

peace_freak

Zen Follower

Join Date:
Apr 2006
Posts:
354
Plugin Contributions:
0

Re: Future Japanese Language Pack Status, version 1.5.5 and beyond...

Thank you for both posts mc12345678. This is going to be quite a job... I've an earlier Japanese version of the includes/languages/japanese that I'm manually comparing to the 1.5.5 English version... I'm beginning to understand the process.

I'd also like to have a Japanese Admin but in version 1.5.5 I don't see any admin folder to add language files to. What do I need to do?

Thanks!

20 Feb 2016, 1:57 PM
#13
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Future Japanese Language Pack Status, version 1.5.5 and beyond...

Peace Freak:

Thank you for both posts mc12345678. This is going to be quite a job... I've an earlier Japanese version of the includes/languages/japanese that I'm manually comparing to the 1.5.5 English version... I'm beginning to understand the process.

I'd also like to have a Japanese Admin but in version 1.5.5 I don't see any admin folder to add language files to. What do I need to do?

Thanks!

In which version ZC 1.5.5 are you not seeing the languages folder for admin? The english version has one as can be seen here in the folder listing. I had thumbed through the japanese version at one point but didn't look for such differences.

20 Feb 2016, 2:04 PM
#14
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Future Japanese Language Pack Status, version 1.5.5 and beyond...

Fyi, I just an internet search on 'beyond compare regex' and one of the results included how to use regex to define "unimportant" text as minor... Such a "setup" could simplify the compare if you are using that program as a comparison tool. Other tools may offer the same capability.

21 Feb 2016, 4:18 AM
#15
peace_freak avatar

peace_freak

Zen Follower

Join Date:
Apr 2006
Posts:
354
Plugin Contributions:
0

Re: Future Japanese Language Pack Status, version 1.5.5 and beyond...

Thanks mc12345678. I re-downloaded the most recent beta and it was included. It might have been in the earlier version I downloaded but perhaps I forgot to upload it to the server...

21 Feb 2016, 4:59 AM
#16
peace_freak avatar

peace_freak

Zen Follower

Join Date:
Apr 2006
Posts:
354
Plugin Contributions:
0

Re: Future Japanese Language Pack Status, version 1.5.5 and beyond...

I'm working on updating japanese.php (in includes/languages) and have been comparing the new English 1.5.5 version with an older Japanese version that I'm updating.

The older version had a few lines of code that I believe I can delete, but I'd like to check before I do so. There are five lines of code in red with the words "no longer needed?" beside them.

Can I remove them without causing problems? The English version (1.5.5) does not have that code so I guess it's not needed.

Thanks!

Japanese Version 1.3.8 adjusted to 1.5.5:

<?php /** * @package languageDefines * @copyright Copyright 2003-2014 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license <http://www.zen-cart.com/license/2_0.txt> GNU Public License V2.0 * @version GIT: $Id: Author: ajeh Modified in v1.5.4 $ */ // FOLLOWING WERE moved to meta_tags.php //define('TITLE', 'Zen Cart!'); //define('SITE_TAGLINE', 'The Art of E-commerce'); //define('CUSTOM_KEYWORDS', 'ecommerce, open source, shop, online shopping'); // END: moved to meta_tags.php define('FOOTER_TEXT_BODY', 'Copyright © ' . date('Y') . ' <a href="' . zen_href_link(FILENAME_DEFAULT) . '" target="_blank">' . STORE_NAME . '</a>. Powered by <a href="http://www.zen-cart.com" target="_blank">Zen Cart</a>'); // look in your $PATH_LOCALE/locale directory for available locales.. $locales = array('ja_JP', 'ja_JP.UTF-8', 'jp', 'Japanese_Japan.1041'); @setlocale(LC_TIME, $locales); define('DATE_FORMAT_SHORT', '%Y/%m/%d'); // this is used for strftime() define('DATE_FORMAT_LONG', '%Y年%m月%d日(%a)'); // this is used for strftime() define('DATE_FORMAT', 'Y/m/d'); // this is used for date() define('DATE_TIME_FORMAT', DATE_FORMAT_SHORT . ' %H:%M:%S'); // if mbstring is not load, use mb-emulator (no longer needed?) // EMAIL config define('EMAIL_CHARSET', 'utf-8'); (no longer needed?) define('EMAIL_ENCODING', '7bit'); (no longer needed?) define('EMAIL_MIMEHEADER', 'B'); (no longer needed?) define('EMAIL_IS_MULTIBYTE', TRUE); (no longer needed?) //// // Return date in raw format mm/dd/yyyy // $date should be in format yyyy/mm/dd -- Change for Japanese date format // raw date is in format YYYYMMDD, or DDMMYYYY if (!function_exists('zen_date_raw')) { function zen_date_raw($date, $reverse = false) { if ($reverse) { return substr($date, 8, 2) . substr($date, 5, 2) . substr($date, 0, 4); } else { return substr($date, 0, 4) . substr($date, 5, 2) . substr($date, 8, 2); } } } // if USE_DEFAULT_LANGUAGE_CURRENCY is true, use the following currency, instead of the applications default currency (used when changing language) define('LANGUAGE_CURRENCY', 'JPY'); // Global entries for the <html> tag define('HTML_PARAMS','dir="ltr" lang="ja"'); // charset for web pages and emails define('CHARSET', 'utf-8'); // footer text in includes/footer.php define('FOOTER_TEXT_REQUESTS_SINCE', 'requests since'); **1.5.5 E Version:** <?php /** * @package languageDefines * @copyright Copyright 2003-2014 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license <http://www.zen-cart.com/license/2_0.txt> GNU Public License V2.0 * @version GIT: $Id: Author: ajeh Modified in v1.5.4 $ */ // FOLLOWING WERE moved to meta_tags.php //define('TITLE', 'Zen Cart!'); //define('SITE_TAGLINE', 'The Art of E-commerce'); //define('CUSTOM_KEYWORDS', 'ecommerce, open source, shop, online shopping'); // END: moved to meta_tags.php define('FOOTER_TEXT_BODY', 'Copyright © ' . date('Y') . ' <a href="' . zen_href_link(FILENAME_DEFAULT) . '" target="_blank">' . STORE_NAME . '</a>. Powered by <a href="http://www.zen-cart.com" target="_blank">Zen Cart</a>'); // look in your $PATH_LOCALE/locale directory for available locales.. $locales = array('en_US', 'en_US.utf8', 'en', 'English_United States.1252'); @setlocale(LC_TIME, $locales); define('DATE_FORMAT_SHORT', '%m/%d/%Y'); // this is used for strftime() define('DATE_FORMAT_LONG', '%A %d %B, %Y'); // this is used for strftime() define('DATE_FORMAT', 'm/d/Y'); // this is used for date() define('DATE_TIME_FORMAT', DATE_FORMAT_SHORT . ' %H:%M:%S'); //// // Return date in raw format // $date should be in format mm/dd/yyyy // raw date is in format YYYYMMDD, or DDMMYYYY if (!function_exists('zen_date_raw')) { function zen_date_raw($date, $reverse = false) { if ($reverse) { return substr($date, 3, 2) . substr($date, 0, 2) . substr($date, 6, 4); } else { return substr($date, 6, 4) . substr($date, 0, 2) . substr($date, 3, 2); } } } // if USE_DEFAULT_LANGUAGE_CURRENCY is true, use the following currency, instead of the applications default currency (used when changing language) define('LANGUAGE_CURRENCY', 'USD'); // Global entries for the <html> tag define('HTML_PARAMS','dir="ltr" lang="en"'); // charset for web pages and emails define('CHARSET', 'utf-8'); // footer text in includes/footer.php define('FOOTER_TEXT_REQUESTS_SINCE', 'requests since');
21 Feb 2016, 2:02 PM
#17
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Future Japanese Language Pack Status, version 1.5.5 and beyond...

Best "test" is to comment out those lines (adding // at the beginning of each line) that way, at least if it doesn't work, then the solution is to uncomment rather than re-develop.

An alternative action could be to start a github repo, that way you can pose and track questions like that and others can add/chime in.

This is also case where you may want to have the Japanese version "running" to use the dtk to discover if that code is needed, to try it out, etc...

24 Feb 2016, 11:19 AM
#19
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Future Japanese Language Pack Status, version 1.5.5 and beyond...

yama:

https://github.com/zencart-ja/zc-v1-series/blob/01dd2ca06d1765fe9c068fe6ec640c4eaf96d6e7/includes/languages/japanese.php
Japanese language file is here.(for v1.5.5)

Yeah, that generally makes sense, if the software is the same other than the "language pack" then the base languages file and all subdirectory language files would be a good "comparison" to ensure that the text displayed in the english ZC shows the proper japanese when selected. The above referenced file is just the base language file and generally would not be expected to contain all of the defines for modules, pages, etc... Those would be (expected to be) in the applicable subdirectory(ies).

26 Feb 2016, 11:50 PM
#20
peace_freak avatar

peace_freak

Zen Follower

Join Date:
Apr 2006
Posts:
354
Plugin Contributions:
0

Re: Future Japanese Language Pack Status, version 1.5.5 and beyond...

Thank you Yama for the file. It was useful and I made corrections to my version. Are you working on updating the Japanese version to 1.5.5, too?

mc12345678, regarding the dtk (Developers Tool Kit), I wonder if you could give me an example on how to use it for checking things.

My process has been to manually compare the Japanese version I have to the latest version. when I find differences, I adjust the old version to match the new.

Today I "completed" the language files in admin and includes and uploaded them to the server. The store "appears" to be fine (I've not done any serious testing yet), but in admin I see a yellow "MISSING LANGUAGE FILES OR DIRECTORIES ... Japanese Japanese" warning and the "Define Language" selector only has English listed, I can't switch the admin to Japanese.

Would appreciate if someone would point me in the right direction...

Thanks!