Skip to content

tina4stack/tina4php-localization

Repository files navigation

tina4php-localization

Localization for PHP using GetText

We assume that our charset is UTF-8 and the base language is English.

https://www.gnu.org/software/gettext/manual/gettext.html

Installation

Useful tools

msginit - makes a po file

Locale examples

Locale Language Country
da_DK Danish Denmark
de_AT German Austria
de_CH German Switzerland
de_DE German Germany
el_GR Greek Greece
en_CA English Canada
en_GB English United Kingdom
en_IE English Ireland
en_US English United States
es_ES Spanish Spain
fi_FI Finnish Finland
fr_BE French Belgium
fr_CA French Canada
fr_CH French Switzerland
fr_FR French France
it_CH Italian Switzerland
it_IT Italian Italy
ja_JP Japanese Japan
ko_KR Korean Korea
nl_BE Dutch Belgium
nl_NL Dutch Netherlands
no_NO Norwegian (Nynorsk) Norway
no_NO_B Norwegian (Bokmål) Norway
pt_PT Portuguese Portugal
sv_SE Swedish Sweden
tr_TR Turkish Turkey
zh_CN Chinese (Simplified) China
zh_TW Chinese (Traditional) Taiwan

Example of a.pot template file

#: modules/user/views_handler_filter_user_name.inc:29
msgid "Enter a comma separated list of user names."
msgstr ""

#: modules/user/views_handler_filter_user_name.inc:112
msgid "Unable to find user: @users"
msgid_plural "Unable to find users: @users"
msgstr[0] ""
msgstr[1] ""

Build a po file

msgfmt messages.po -o src/locale/de_DE.mo

Our Sponsors

Sponsored with 🩵 by Code Infinity

Code Infinity

Supporting open source communities Innovate Code Empower

About

Tina4 PHP Localizations

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors