Difference between revisions of "Languages"

From Zen Cart(tm) Wiki
Jump to: navigation, search
(Language packs)
 
(43 intermediate revisions by 19 users not shown)
Line 9: Line 9:
 
== Installing a language pack ==
 
== Installing a language pack ==
 
# [[Languages#List_of_known_language_packs|Download the language pack]].
 
# [[Languages#List_of_known_language_packs|Download the language pack]].
# If the language pack was written for an older version of Zen Cart, you'll need to [[Languages#Updating_an_older_translation|update the language pack]] before proceeding.
+
# If the language pack was written for an older version of Zen Cart™, you'll need to [[Languages#Updating_an_older_translation|update the language pack]] before proceeding.
 
# Upload the files and directories to your server.
 
# Upload the files and directories to your server.
# Go to Admin > Localization > Languages and click the "new language" button. Fill in the details and make sure you put the correct directory in "Directory" with proper case - 'English' is not the same as 'english'.
+
# Go to Admin > Localization > Languages and click the ''new language'' button. Fill in the details and make sure you put the correct directory in ''Directory'' with proper case - ''English'' is not the same as ''english''.
  
  
 
Make sure that the files and directories are uploaded to the appropriate places, which are:
 
Make sure that the files and directories are uploaded to the appropriate places, which are:
:* includes/languages/<your language>.php
+
:* ''includes/languages/<your language>.php''
:* includes/languages/<your language>/
+
:* ''includes/languages/<your language>/*''
:* admin/includes/languages/<your language>.php
+
:* ''admin/includes/languages/<your language>.php''
:* admin/includes/languages/<your language>/
+
:* ''admin/includes/languages/<your language>/*''
:* includes/templates/template_default/buttons/<your language>/
+
:* ''includes/templates/template_default/buttons/<your language>/''
  
  
Line 25: Line 25:
 
==== MISSING LANGUAGE FILES OR DIRECTORIES ... ====
 
==== MISSING LANGUAGE FILES OR DIRECTORIES ... ====
  
Some language packs may not include the admin files, which will result in errors when you enter the admin area. To solve this issue, simply copy the english language files for the admin area into a directory for your language.
+
Some language packs may not include the ''Admin'' files, which will result in errors when you enter the ''Admin'' area. To solve this issue, simply copy the english language files for the ''Admin'' area into a directory for your language.
  
  
 
In other words, copy
 
In other words, copy
:admin/includes/languages/english.php
+
:''admin/includes/languages/english.php''
:admin/includes/languages/english/
+
:''admin/includes/languages/english/''
 
to
 
to
:admin/includes/languages/<your language>.php
+
:''admin/includes/languages/<your language>.php''
:admin/includes/languages/<your language>/
+
:''admin/includes/languages/<your language>/''
  
  
'''Note to translators:''' If you haven't translated the admin area, please include the english language files for the admin in your language pack so users don't have to experience this.
+
''Note to translators:'' If you haven't translated the ''Admin'' area, please include the english language files for the ''Admin'' in your language pack so users don't have to experience this.
 +
 
 +
 
 +
=== Customizing ===
 +
 
 +
You should avoid to edit the original files from the language pack you downloaded: if it is updated (to complete it or to follow new releases of Zen Cart), either you loose your changes if you just overwrite older files, or it would be more work to update your modified files (can be done with diff utils as explained below).
 +
 
 +
For minor edits, use the override system: copy the language files from the above directories to
 +
:''includes/templates/<current template>/buttons/<your language>/''
 +
:''includes/languages/<current template>/<your language>.php''
 +
:''includes/languages/<your language>/<current template>/''
 +
:''includes/languages/<your language>/<other sub-directories>/<current template>/''
 +
and edit the new files. It seems the admin section has no such override.
 +
 
 +
{{hintBox|Tips!|
 +
# Watch out the "classic" folders (in 1.3.7 at least) to see where you can put your template folders.
 +
# If you see an all capital string in place of a message, the corresponding language definition is missing from your language file. Look it up in the English language file and add it to your translation.
 +
}}
  
  
Line 45: Line 62:
  
 
The following files and directories with subdirectories should all be included in the language pack, whether they're translated or not
 
The following files and directories with subdirectories should all be included in the language pack, whether they're translated or not
:* includes/languages/<your language>.php
+
:* ''includes/languages/<your language>.php''
:* includes/languages/<your language>/
+
:* ''includes/languages/<your language>/''
:* admin/includes/languages/<your language>.php
+
:* ''admin/includes/languages/<your language>.php''
:* admin/includes/languages/<your language>/
+
:* ''admin/includes/languages/<your language>/''
:* includes/templates/template_default/buttons/<your language>/
+
:* ''includes/templates/template_default/buttons/<your language>/''
  
'''All paths should be included in the package as shown above in order to make it easy to extract onto a server without the need to move files or directories around.'''
+
 
 +
All paths should be included in the package as shown above in order to make it easy to extract onto a server without the need to move files or directories around.
  
  
 
Additionally but not required, there's the SQL file
 
Additionally but not required, there's the SQL file
:install/mysql_zencart.sql
+
:''install/mysql_zencart.sql''
which contains text that will appear on certain admin pages. This means that the admin area isn't 100% multi-lingual, but this will most likely be dealt with in a future version of Zen Cart.
+
which contains text that will appear on certain ''Admin'' pages. This means that the ''Admin'' area isn't 100% multi-lingual, but this will most likely be dealt with in a future version of Zen Cart&trade;.
  
  
You should also include a file named README.txt where you say something about what has been translated and what has not, along with any other information you feel is appropriate.
+
You should also include a file named ''README.txt'' where you say something about what has been translated and what has not, along with any other information you feel is appropriate.
  
  
Line 72: Line 90:
 
</nowiki></pre></code>
 
</nowiki></pre></code>
 
It makes it easier for users if they don't have to know the correct locale themselves, and we can guess it for them by editing the call to setlocale() in the following files to use the above code:
 
It makes it easier for users if they don't have to know the correct locale themselves, and we can guess it for them by editing the call to setlocale() in the following files to use the above code:
* includes/languages/<your language>.php
+
* ''includes/languages/<your language>.php''
* admin/includes/languages/<your language>.php}}
+
* ''admin/includes/languages/<your language>.php''
  
  
The Zen Cart download area isn't working at the moment, but the team is working on a new support site. Meanwhile, there seems to be no organised way of uploading your translations, so untill the new support site is done, feel free to [http://www.zen-cart.com/modules/ipb/index.php?act=Msg&CODE=04&MID=7221 contact dwno] if you need server space for your translation.  
+
== Updating an older translation ==
(If anyone else have a better solution, let's hear it. ;-))
+
If a language pack is out of date, you can easily make it up to date by comparing the English language files from the Zen Cart&trade; version that the language pack you wish to update was made for against the English language files of the new Zen Cart&trade; version you wish to update to.
  
 
== Updating an older translation ==
 
If a language pack is out of date, you can easily make it up to date by comparing the '''english''' language files from the Zen Cart version that the language pack you wish to update was made for against the '''english''' language files of the new Zen Cart version you wish to update '''to'''.
 
  
 
Here's how to do that:
 
Here's how to do that:
# [http://sourceforge.net/project/showfiles.php?group_id=83781 Download] the Zen Cart version that matches the original language pack and the Zen Cart version you wish to update the language pack for.
+
# [http://sourceforge.net/project/showfiles.php?group_id=83781 Download] the Zen Cart&trade; version that matches the original language pack and the Zen Cart&trade; version you wish to update the language pack for.
# Unpack the 2 packages into 2 '''separate''' directories
+
# Unpack the two packages into two separate directories.
# Open a comparison program like [http://winmerge.sourceforge.net/ WinMerge](for windows) or FileMerge (for MacOSX - free utility with [http://developer.apple.com/tools/download/ Xcode] developer tools from Apple.)  
+
# Open a comparison program like [http://www.scootersoftware.com/download.php Beyond Compare] or [http://winmerge.sourceforge.net/ WinMerge] (for Windows&trade; only)
# Compare the 2 versions of the directories includes/languages and admin/includes/languages, and be sure to ''include subfolders''
+
# Compare the two versions of the directories ''includes/languages and admin/includes/languages'', and be sure to include subfolders.
#* If a file exists only in the older release, delete it from ''your language pack''
+
#* If a file exists only in the older release, delete it from your language pack.
#* If a file exists only in the newer release, copy that english language file into ''your language pack'' and translate it
+
#* If a file exists only in the newer release, copy that English language file into your language pack and translate it.
#* If a file has changed between the 2 versions, compare those '''english''' files to see what exact changes has been made, and update your language pack accordingly
+
#* If a file has changed between the two versions, compare those English files to see what exact changes has been made, and update your language pack accordingly.
# Compare the 2 versions of the directory includes/templates/template_default/buttons/english/ and see if there are any new files. You may also consider updating the images if anyone have changed, but that's probably not strictly necessary.
+
# Compare the two versions of the directory ''includes/templates/template_default/buttons/english/'' and see if there are any new files. You may also consider updating the images if anyone have changed, but that's probably not strictly necessary.
  
  
 
'''Please share your updated translation with the community. Thank you!'''
 
'''Please share your updated translation with the community. Thank you!'''
  
<div id="List_of_known_language_packs" />
+
== List of known language packs ==
 
+
* [http://www.zen-cart.com/downloads.php?do=file&id=855 Arabic v1.3.8]
 +
* [http://www.zen-cart.com/downloads.php?do=file&id=251 Chinese v1.5.1]
 +
* Chinese Traditional [http://www.zen-cart.com/downloads.php?do=file&id=951 Admin v1.3.8] [http://www.zen-cart.com/downloads.php?do=file&id=481 Catalog v1.3.8]
 +
* [http://www.zen-cart.com/downloads.php?do=file&id=146 Czech v1.5.0]
 +
* [http://www.zen-cart.com/downloads.php?do=file&id=891 Danish v1.3.8]
 +
* [http://www.zen-cart.com/downloads.php?do=file&id=1156 Dutch v1.5.0]
 +
* [http://www.zen-cart.com/downloads.php?do=file&id=242 Finnish v1.5.0]
 +
* [http://www.zen-cart.com/downloads.php?do=file&id=62 French v1.3.9]
 +
* [http://www.zen-cart.com/downloads.php?do=file&id=205 German v1.5.1]
 +
* [http://www.zen-cart.com/downloads.php?do=file&id=917 Greek v1.3.8]
 +
* [http://www.zen-cart.com/downloads.php?do=file&id=1657 Hebrew v1.5.1]
 +
* [http://www.zen-cart.com/downloads.php?do=file&id=204 Hungarian v1.3.8]
 +
* [http://www.zen-cart.com/downloads.php?do=file&id=719 Indonesian v1.3.8]
 +
* [http://www.zen-cart.com/downloads.php?do=file&id=161 Italian v1.5.0]
 +
* [http://www.zen-cart.com/downloads.php?do=file&id=284 Japanese v1.3.0]
 +
* [http://www.zen-cart.com/downloads.php?do=file&id=429 Lithuanian v1.3.8]
 +
* [http://www.zen-cart.com/downloads.php?do=file&id=113 Norwegian v1.5.0]
 +
* [http://www.zen-cart.com/downloads.php?do=file&id=1050 Polish v1.5.0]
 +
* [http://www.zen-cart.com/downloads.php?do=file&id=945 Portuguese v1.3.8]
 +
* [http://www.zen-cart.com/downloads.php?do=file&id=194 Romanian v1.5.0]
 +
* [http://www.zen-cart.com/downloads.php?do=file&id=1244 Russian v1.3.9]
 +
* [http://www.zen-cart.com/downloads.php?do=file&id=935 Serbian v1.3.8]
 +
* [http://www.zen-cart.com/downloads.php?do=file&id=432 Slovak v1.3.8]
 +
* [http://www.zen-cart.com/downloads.php?do=file&id=1110 Spanish v1.5.1]
 +
* [http://www.zen-cart.com/downloads.php?do=file&id=1284 Swedish v1.5.1]
 +
* [http://www.zen-cart.com/downloads.php?do=file&id=504 Turkish v1.3.7]
 +
* [http://www.zen-cart.com/downloads.php?do=file&id=857 Vietnamese v1.3.8]
  
 
== Language packs ==
 
== Language packs ==
Also see [http://www.zen-cart.com/index.php?main_page=index&cPath=40 the download area] for a lot of older translations.
+
The [http://www.zen-cart.com/index.php?main_page=index&cPath=40 download area] is working now, so there shouldn't be any further need of this list.
 +
* [http://www.zen-cart.com/index.php?main_page=index&cPath=40_46 Download language packs]
  
  
If you're looking for older versions of Zen Cart or the default English language files, they can be found at [http://sourceforge.net/project/showfiles.php?group_id=83781 the project's section at sourceforge.net].
+
If you're looking for older versions of Zen Cart&trade; or the default English language files, they can be found at [http://sourceforge.net/project/showfiles.php?group_id=83781 the project's section at sourceforge.net].
  
  
'''If you know of any language packs not mentioned here, please [http://www.zen-cart.com/wiki/index.php?title=Languages&action=edit&section=7 add them to this list] in alphabetical order and remember to provide a download link.'''
+
'''If you have access to a language pack not listed in [http://www.zen-cart.com/index.php?main_page=index&cPath=40_46 the download area], please [http://www.zen-cart.com/index.php?main_page=add_contrib upload it].'''
  
  
* Chinese Simplified: [http://www.zen-cart.cn/modules/wfdownloads/visit.php?cid=5&lid=68 1.2.6d (gb2312)] [http://www.zen-cart.cn/modules/wfdownloads/singlefile.php?cid=5&lid=124 1.3.0.1 (gb2312)]
+
=== Wanted translations ===
* Chinese Traditional: [http://open.38.com/index.php?action=dlattach;topic=272.0;id=306 1.2.6d (Big5)] | [http://open.38.com/index.php?action=dlattach;topic=272.0;id=307 1.2.6d (UTF-8)]
+
Feel free to add any languages you would like to see for Zen Cart&trade; here. This could be used to connect people who wants to translate into a certain language, so you might want to leave a way of contacting you if you're willing to participate in translating.
* Danish: [http://www.dataweb.no/dl/zen/zen-cart_danish.zip 1.2.6d]
 
* [http://www.zen-cart.nl/forums/index.php?board=16.0 Dutch]: [http://www.dataweb.no/dl/zen/zen-cart-v1.2.6d_taalbestanden-nl-v2.0.zip 1.2.6d]
 
* [http://openprojects.ch/frs/?group_id=28 French]: [http://openprojects.ch/frs/download.php/90/French_Translation_ZenCart_V1.2.6.zip 1.2.6d]
 
* [http://sourceforge.net/projects/zencart-german/ German]: [http://sourceforge.net/project/showfiles.php?group_id=146657&package_id=161401&release_id=352079 1.2.6d]
 
* [http://www.zen-cart.it/modules/mydownloads/viewcat.php?cid=5 Italian]: [http://www.zen-cart.it/modules/mydownloads/visit.php?cid=5&lid=12 1.2.5]
 
* [http://sourceforge.net/projects/nb-translations/ Norwegian bokmal]: [http://www.zen-cart.com/index.php?main_page=download_contrib&contrib_id=210&update_id=1 1.3.0.2]
 
* [http://sourceforge.net/project/showfiles.php?group_id=127140 Spanish]
 
* Swedish : [http://www.aloeveraonline.se/Swedish1.26dwithbuttons.ZIP 1.2.6.d]
 
  
  
=== Wanted translations ===
 
Feel free to add any languages you would like to see for Zen Cart here. This could be used to connect people who wants to translate into a certain language, so you might want to leave a way of contacting you if you're willing to participate in translating.
 
 
*Japanese: 1.2.6d
 
*Korean: 1.2.6d
 
 
*Arabic
 
*Arabic
 +
*British-English/Hiberno-English
 +
*Korean
 +
*Vietnamese
  
 
== International support sites ==
 
== International support sites ==
* [http://www.zen-cart.cn/ Chinese Simplified support site]
+
* [http://www.zen-cart.cn/ Chinese support site]
* [http://open.38.com/index.php/board,35.0.html/ Chinese Traditional support site]
 
 
* [http://www.zen-cart.nl/ Dutch support site]
 
* [http://www.zen-cart.nl/ Dutch support site]
* [http://zencart.zenfr.info/ French support site]
+
* [http://www.zen-cart.fr/ French support site]
* [http://www.zen-cart.at/ German support site]
+
* [http://www.zen-cart.it/ Italian support site]
* [http://www.zen-cart.opzione.com/ Italian support site]
+
* [http://www.zen-cart.jp/ Japanese support site]
* [http://zen-cart.jp/ Japanese support site]
 
* [http://www.zen-cart.no/ Norwegian support site]
 
 
* [http://br.groups.yahoo.com/group/zen-cart-pt/ Portuguese support site]
 
* [http://br.groups.yahoo.com/group/zen-cart-pt/ Portuguese support site]
* [http://zen-cart.ru/ Russian support site]
 
* [http://www.zencartes.com/ Spanish support site]
 

Latest revision as of 20:23, 24 February 2015

Introduction

Translations are done on a volunteer basis, so the quality and even installation instructions may vary.


You are always welcome to help improve a translation, by either making your suggestions known to the author of the translation or by making your wanted changes yourself.


Installing a language pack

  1. Download the language pack.
  2. If the language pack was written for an older version of Zen Cart™, you'll need to update the language pack before proceeding.
  3. Upload the files and directories to your server.
  4. Go to Admin > Localization > Languages and click the new language button. Fill in the details and make sure you put the correct directory in Directory with proper case - English is not the same as english.


Make sure that the files and directories are uploaded to the appropriate places, which are:

  • includes/languages/<your language>.php
  • includes/languages/<your language>/*
  • admin/includes/languages/<your language>.php
  • admin/includes/languages/<your language>/*
  • includes/templates/template_default/buttons/<your language>/


Troubleshooting

MISSING LANGUAGE FILES OR DIRECTORIES ...

Some language packs may not include the Admin files, which will result in errors when you enter the Admin area. To solve this issue, simply copy the english language files for the Admin area into a directory for your language.


In other words, copy

admin/includes/languages/english.php
admin/includes/languages/english/

to

admin/includes/languages/<your language>.php
admin/includes/languages/<your language>/


Note to translators: If you haven't translated the Admin area, please include the english language files for the Admin in your language pack so users don't have to experience this.


Customizing

You should avoid to edit the original files from the language pack you downloaded: if it is updated (to complete it or to follow new releases of Zen Cart), either you loose your changes if you just overwrite older files, or it would be more work to update your modified files (can be done with diff utils as explained below).

For minor edits, use the override system: copy the language files from the above directories to

includes/templates/<current template>/buttons/<your language>/
includes/languages/<current template>/<your language>.php
includes/languages/<your language>/<current template>/
includes/languages/<your language>/<other sub-directories>/<current template>/

and edit the new files. It seems the admin section has no such override.

Idea.png Tips!
  1. Watch out the "classic" folders (in 1.3.7 at least) to see where you can put your template folders.
  2. If you see an all capital string in place of a message, the corresponding language definition is missing from your language file. Look it up in the English language file and add it to your translation.


Creating a new translation

Read about editing in PHP to learn how to properly edit text definitions.


The following files and directories with subdirectories should all be included in the language pack, whether they're translated or not

  • includes/languages/<your language>.php
  • includes/languages/<your language>/
  • admin/includes/languages/<your language>.php
  • admin/includes/languages/<your language>/
  • includes/templates/template_default/buttons/<your language>/


All paths should be included in the package as shown above in order to make it easy to extract onto a server without the need to move files or directories around.


Additionally but not required, there's the SQL file

install/mysql_zencart.sql

which contains text that will appear on certain Admin pages. This means that the Admin area isn't 100% multi-lingual, but this will most likely be dealt with in a future version of Zen Cart™.


You should also include a file named README.txt where you say something about what has been translated and what has not, along with any other information you feel is appropriate.


{{infoBox|setlocale()|As the minimum required version for PHP now is 4.3, we can specify multiple locales for setlocale():
setlocale(LC_TIME,
	'english',
	'en_US',
	'en_US.iso_8859-1',
	'en_US.ISO_8859-1',
	'en_US.utf-8',
	'en_US.UTF-8'
);

It makes it easier for users if they don't have to know the correct locale themselves, and we can guess it for them by editing the call to setlocale() in the following files to use the above code:

  • includes/languages/<your language>.php
  • admin/includes/languages/<your language>.php


Updating an older translation

If a language pack is out of date, you can easily make it up to date by comparing the English language files from the Zen Cart™ version that the language pack you wish to update was made for against the English language files of the new Zen Cart™ version you wish to update to.


Here's how to do that:

  1. Download the Zen Cart™ version that matches the original language pack and the Zen Cart™ version you wish to update the language pack for.
  2. Unpack the two packages into two separate directories.
  3. Open a comparison program like Beyond Compare or WinMerge (for Windows™ only)
  4. Compare the two versions of the directories includes/languages and admin/includes/languages, and be sure to include subfolders.
    • If a file exists only in the older release, delete it from your language pack.
    • If a file exists only in the newer release, copy that English language file into your language pack and translate it.
    • If a file has changed between the two versions, compare those English files to see what exact changes has been made, and update your language pack accordingly.
  5. Compare the two versions of the directory includes/templates/template_default/buttons/english/ and see if there are any new files. You may also consider updating the images if anyone have changed, but that's probably not strictly necessary.


Please share your updated translation with the community. Thank you!

List of known language packs

Language packs

The download area is working now, so there shouldn't be any further need of this list.


If you're looking for older versions of Zen Cart™ or the default English language files, they can be found at the project's section at sourceforge.net.


If you have access to a language pack not listed in the download area, please upload it.


Wanted translations

Feel free to add any languages you would like to see for Zen Cart™ here. This could be used to connect people who wants to translate into a certain language, so you might want to leave a way of contacting you if you're willing to participate in translating.


  • Arabic
  • British-English/Hiberno-English
  • Korean
  • Vietnamese

International support sites