Difference between revisions of "CcHost Localization"
Jon Phillips (talk | contribs) |
Jon Phillips (talk | contribs) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | |||
[[Category:i18n]] | [[Category:i18n]] | ||
[[Category:Developer]] | [[Category:Developer]] | ||
Line 11: | Line 10: | ||
# (DONE) comment out old cc-language.php classes and code temporarily | # (DONE) comment out old cc-language.php classes and code temporarily | ||
# (DONE) connect together the primary locale selection system in cc-language.php | # (DONE) connect together the primary locale selection system in cc-language.php | ||
− | # connect up the event handing for all this locale stuff | + | # (DONE) connect up the event handing for all this locale stuff |
− | # add ability to create and manage PO files in PHP that is abstract enough to be used across different projects. | + | # (DONE) add ability to create and manage PO files in PHP that is abstract enough to be used across different projects. |
− | # replace all cct() functions with gettext(). | + | # (DONE) replace all cct() functions with gettext(). |
− | # add UI for the selection of languages, similar to CC's | + | # (DONE) add UI for the selection of languages, similar to CC's |
− | # Connect up admin string editor | + | # (NOT DOING) Connect up admin string editor |
− | # make selectable locale system for | + | # (DONE) make selectable locale system for users |
+ | |||
+ | * NOTE: The major parts of this code are now in the ccHost codebase, so please have fun! | ||
== Locale On-disk Hierarachy == | == Locale On-disk Hierarachy == | ||
Line 35: | Line 36: | ||
<pre> | <pre> | ||
if (! dir_name ($locale) ) | if (! dir_name ($locale) ) | ||
+ | $locale = "locale/$PROJECTNNAME</pre> | ||
+ | else | ||
$locale = 'locale'; | $locale = 'locale'; | ||
− | + | </pre> | |
− | + | ||
+ | Ok, the above task took more code than this in order to have fallback locale preferences. | ||
+ | |||
+ | === [[Translating ccHost]] === | ||
+ | |||
+ | Please come help us [[Translating ccHost|translate ccHost]]. |
Latest revision as of 05:31, 29 August 2006
ccHost currently is in need of standard Open Source translations. Victor Stone, a core developer on the project has created one way to for admins to edit strings and to solve this problem. Unfortunately, to complete the task and be compatible with 95% of the localization strategies in the world, ccHost is transitioning to use the common application, gettext.
The following steps outline the process of making ccHost gettextable:
- (DONE) develop test case for understanding how to plug into the project
- (DONE) comment out old cc-language.php classes and code temporarily
- (DONE) connect together the primary locale selection system in cc-language.php
- (DONE) connect up the event handing for all this locale stuff
- (DONE) add ability to create and manage PO files in PHP that is abstract enough to be used across different projects.
- (DONE) replace all cct() functions with gettext().
- (DONE) add UI for the selection of languages, similar to CC's
- (NOT DOING) Connect up admin string editor
- (DONE) make selectable locale system for users
- NOTE: The major parts of this code are now in the ccHost codebase, so please have fun!
Locale On-disk Hierarachy
/WEBROOT/ /locale /PROJECT_NAME (for setting up a ccmixter and cchost translatable .po file. /en_US /zh_CN
Logic
Select project
if (! dir_name ($locale) ) $locale = "locale/$PROJECTNNAME
else
$locale = 'locale';
Ok, the above task took more code than this in order to have fallback locale preferences.
Translating ccHost
Please come help us translate ccHost.