Using tokens, keys, etc

gettext()_ and the equivalent wordpress __() functions will all return the string you call with if there is no translation found. A common thought is can I use a key / token in place of the source text so that my code never needs to change and just the translations get edited. Well, yes you […]

Read More

Translation Software & Plugins

POEDIT https://poedit.net Free / Low Cost windows software which can scan your code and then provides all the translation features you need. Seems pretty popular. WPML https://wpml.org Very popular, very featured, apparently a really good choice its hard to go wrong with and not excessively expensive. Polylang https://polylang.pro/ Another very popular wordpress choice Weglot https://weglot.com […]

Read More

.Translation functions

Quick reference Best practice tips Use entire sentences – in most languages word order is different than that in English. Split at paragraphs – merge related sentences, but do not include a whole page of text in one string. Assume strings can double in length when translated text-domain You have to specify a text-domain with […]

Read More

Language Files

The Files Used For Translating You’ll have one pair of PO/MO files per language and region, but only one (optional) POT per domain. PO (Portable Object) file A list of readable “translated objects” MO (Machine Object) file The corresponding binary (to be interpreted by Gettext when doing localization). POT (PO Template) file Contains all existing […]

Read More