Update:Remora Localization: Difference between revisions

m
gettext tagging
(extracting and merging .po files)
 
m (gettext tagging)
Line 1: Line 1:
== L10n standards ==
== L10n standards ==
see the [[Update:Remora Standards#l10n|Remora standards page on l10n]].
see the [[Update:Remora Standards#l10n|Remora standards page on l10n]].
== gettext tagging ==
Use php's [http://php.net/gettext gettext] functions to make localized strings, for example:
: <code>echo _('error_empty_glass');</code>
To do string replacement, use [http://php.net/sprintf sprintf] like this:
: <code>echo sprintf(_('error_glass_refill'), $beer);</code>
Localizers can then translate it similar to:
: Some more %s was ordered.
and PHP will put in the value of $beer for %s.


== Updating locales ==
== Updating locales ==
Confirmed users
1,209

edits