-
Notifications
You must be signed in to change notification settings - Fork 1
Use i18n internationalization
schnoog edited this page Dec 29, 2017
·
1 revision
This boilerplate facilitates the well known gettext function.
This means, each translated string is within a "mo"-file.
To use translation, you just have to use
_('MyString')
or
gettext('MyString')
instead of 'MyString' within your php code.
Translation for the strings you're using within your templates can be enabled by using for eample
{"This is MyString"|gettext}
instead of "This is MyString"
Each of this calls will retun the gettext result. If no translation is available for this particular string, the string itself will be used as output.