PoNG: I18N

From EWIKI
Jump to navigation Jump to search

PoNG supports internationalization, i.e. changing the language of labels and text on the page.

To offer the user a language switch option, please use the PoNG Module: I18N in the header of the layout.

The language is setting the language code using the lang GET parameter. Default language is "EN". Please use this setting to load content in the specific language from the resources.

TODO: PoNG will pass the "lang" in the "Accept Language" HTML header field for access of backend resources.

Please use the $.i18n( ... ) JS method to lookup labels and text in the requested language setting. Example JS code:


  var linkHtml= '<a href="' + lnk.url + '">' + $.i18n( lnk.text ) +'</a>';

The used I18N package can also do some grammar, plural and gender things. Please refer the jquery.i18n documentation for details.