Skip to content

Create a localization domain

Kenneth Gulbrandsøy edited this page Aug 3, 2014 · 7 revisions

Every module in RescueMe which have localized strings, should define a localization domain. Each domain should define all reusable localized strings as constants. This procedure describes the process of creating one.

###Create a domain file

A domain file has the format <module>.domain.php, where <module> is the module name.

This file, must, by convention, be located in the folder module/locale/domain.

###Register the domain in RescueMe locale

Define a constant with format DOMAIN_<MODULE> in inc/locale.inc.php, where <MODULE> is the module name in capital letters.

###Localize strings in the domain

See [Localizing strings in a domain](Localizing string in a domain).

###Create a PO-file for the domain

Every domain is associated with a PO-file. [Use PoEdit](Translate localized strings with PoEdit) or a similar tool to generate the PO-file automatically from source code in this domain.

###Translate localized strings to supported locales

See [Translate localized strings with PoEdit](Translate localized strings with PoEdit).