I created a simple web page to compare the performance of various localization methods for PHP. It only contains 3 localized strings and does not use advanced features of gettext (e.g. plurals). I wrote a version using the gettext PHP extension (“gettext Ext.”), one using PHP-gettext (“gettext PHP”, a gettext implementation written in pure PHP) …
Tag Archives: gettext
i18n gettext in PHP
gettext is the GNU internationalization and localization (i18n) library. It is commonly used for writing multilingual programs. It has an implementation in a lot of different languages and it’s also commonly used in PHP applications.
Localizing PHP web sites using gettext
Developing multi language web sites using PHP is actually very easy. A common approach is having an include file for every supported language which contains an array that maps string ids to localized text (for example "WelcomeText" => "Welcome to our homepage." would be included using something like <?= $strings["WelcomeText"] >). However there are several …
php gettext
gettext — Lookup a message in the current domain