Pure Blog supports multiple languages via PHP array files in the lang/ directory (such as lang/en.php, lang/fr.php, and lang/nl.php). Community contributions are very welcome, whether you are adding a new language or updating an existing one.
Fallback to en.php
Pure Blog always loads lang/en.php first and then merges your selected language file over the top. If a key is missing from a translation file, Pure Blog automatically falls back to the English string in lang/en.php.
Because of this fallback behaviour, new releases will never break if a language file has not been updated yet — any untranslated strings will simply display in English until a translation is contributed.
Why new strings aren’t added to translation files
Previously, English placeholder strings were added to every language file whenever new text was introduced. This is no longer done.
lang/en.php is now the single source of truth for new and updated strings. Other lang/*.php files are left untouched during development and are only updated when contributors submit translations.
Updating an existing translation
To bring an existing language file up to date with a new release:
- View the diff on GitHub: Go to the Pure Blog repository and compare the previous release tag with the new one (for example, v3.9.3…v3.9.4), or check the commit history for
lang/en.php. - Copy the new lines: Find the newly added or changed keys in
lang/en.phpand copy them into the matching section of your language file (lang/{code}.php), preserving the array structure. - Translate the values: Replace the English text with your translation, leaving any
{placeholder}tokens (such as{year}or{name}) intact. - Open a pull request: Fork the repository, commit your updated
lang/{code}.phpfile, and open a pull request on GitHub.
Adding a new language
If your language is not yet in lang/:
- Copy
lang/en.phptolang/{code}.phpusing the IETF language tag (for example,lang/es.phporlang/zh_TW.php). - Update the
'name'key at the top of the file to the native name of the language. - Translate the strings you want to cover — any keys you omit will fall back to
lang/en.php. - Open a pull request on the Pure Blog repository adding your new
lang/{code}.phpfile.