-
Notifications
You must be signed in to change notification settings - Fork 4
Localizing strings in a domain
Kenneth Gulbrandsøy edited this page Aug 3, 2014
·
1 revision
All strings which are displayed in user interfaces must be localized. Reusable strings should be defined as constants in the localization domain which the source code belongs.
###Localize all strings
Each string is localized by enclosing it with T_(string $text)
, or any of the other localization strings. See [Localization functions](Localization functions) for complete list.
- Check if any strings already is defined in
common.domain.php
as a constant. - Replace them with the associated constants defined in
common.domain.php
.
###Identify reusable localized string
Reusable localized strings should only be localized once in <module>.domain.php
. For examples, see common.domain.php
.
- Define any duplicate strings in the module into
<module>.domain.php
as a constant. - Replace all duplicate strings with this constant.
###Translate localized strings to supported locales
See [Translate localized strings with PoEdit](Translate localized strings with PoEdit).