Update the Core Language classes to have all method parameter type declaration. GetTextReader has gettext as alias to translate. GetTextReader public methods to get cache enable status and short circuit (no translation loaded) status Main language: Add new methods for plural and plural in context (__n, __p, __pn) Deprecate gettext, ngettext, _e Add new translation loader in gettext standard <locale>/LC_MESSAGES/<domain> style Including locales checker, auto detect on enviroment variables, return self as class (for functions type) return translator class after loading, etc New LoadFunctions to run all like functions. Names like php but with two underscores prefixed. eg gettext -> __gettext
Translation files
Source file name convetion
Locale Name . Domain . Encoding .po
Name parte explenations
Locale Name Examples
If underscore in name the long version is checked first, then the short version: en_US@latin -> en_US -> en
- en
- en_US
- en_US@latin
Domain
For current case auto set CONTENT_PATH is used
- admin
- frontend
Encoding
if not set UTF-8 is assumed. Any other utf8 encoding is changed to UTF-8
- UTF-8
- SJIS
- EUC
File name example source
ja_US.admin.UTF-8.po
Folder layout
includes/locale/ja/LC_MESSAGES/frontend.mo
ALTERNATE LOCALE NAMES:
- ja
- ja_JP
- ja.UTF-8
- ja_JP.UTF-8
ja_JP.UTF-8: Locale Name frontend: dmain (CONTENT_PATH)
command
msgfmt -o www/includes/locale/ja_JP/LC_MESSAGES/frontend.UTF-8.mo 4dev/lang/ja_US.admin.UTF-8.po