Languages and translations
On this page
The public site speaks ten languages out of the box. The admin panel is in English only.
The ten languages
| Code | Language | Note |
|---|---|---|
en | English | the default after installation |
bn | Bengali | |
de | German | |
es | Spanish | |
ar | Arabic | written right to left |
tr | Turkish | |
it | Italian | |
ru | Russian | |
fr | French | |
pt | Portuguese |
Each one is a file, languages/<code>.php, and all ten are switched on. The list also holds Japanese, Korean, Chinese and Hindi, switched off and without a file of their own.
Admin → Languages
The list shows Code, Name, Native name, Direction, Default and an Active switch. New language, or the pencil of an existing one:
- Code —
en,pt-br… - Name (English) and Native name — the native name is what visitors see in the language menu.
- Direction — Left to right or Right to left. A right-to-left language turns its pages around, and its tabs in the editors too.
- Flag code — the country of the flag:
us,gb,sa… - Sort order and Active.
What the switch does:
- On — the texts of the language file are copied into Translations; a language without a file gets the English texts to translate.
- Off — the language leaves the language menu and its addresses stop working. Its translations stay.
- Delete — removes the language and its translations. The default language cannot be deleted.
The default language is chosen under Settings → General → Default language. Saving there also switches that language on.
Admin → Translations
Every text of the public site, one row per text and language: Key, Language, Text, Updated. Filter by language, search a key or a word, and press the pencil to change the wording. It shows on the site at once.
Keep the words with a colon in front exactly as they are: in :count views the :count becomes the number.
- Add missing keys copies the texts of the language files that are not in the list yet. An update does the same by itself.
- New translation — choose a language, type a key and its text. This is also how you change a text of a plugin or a theme (below).
What the site shows for a text: the row on this page; otherwise the language file (of the script, a plugin or the theme); otherwise English.
The rows were copied from the files when the language was switched on, so this page holds your wording. A newer version of the script brings new texts, but it does not overwrite wording that is already in the list. To take a text from the file again, delete its row and press Add missing keys.
Language in the address
Settings → General → Language in the address:
| Choice | Addresses |
|---|---|
| Every language (the start setting) | /en/blog and /bn/blog |
| Only the other languages (recommended) | /blog and /bn/blog |
| Never | /blog for everyone; the choice is kept in a cookie |
Old addresses are redirected to the new ones, so links and search results keep working. With Never, search engines only see the default language, and the sitemap lists that language alone.
Which language a visitor sees
- An address that names a language shows that language.
- Every language: the home page address without a code sends the visitor to the language of the browser, when the site has it, otherwise to the default language.
- Only the other languages: the short addresses are the default language. A first-time visitor whose browser asks for another language of the site is sent there once; after that the short addresses show the default language and the language menu leads to the others.
- Never: the language menu remembers the choice in the cookie
aiod_langfor a year. Without a choice: the browser's language, then the default.
Search engines send no language and always get the default one. A member also picks a language in the profile of the account; the confirmation and password e-mails are written in it.
Translating pages, posts and menus
Pages, Blog posts, Categories and Tags have a tab for every active language, each with its own title or name and URL slug (pages, posts and categories also their text and SEO fields). The default language needs a title; a tab left empty shows the default language version. A post is listed in the sitemap only in the languages it is written in.
The 68 landing pages come in all ten languages; the five ordinary pages in English and Bengali. Menu items have Title in other languages (optional). Plugins with texts of their own, such as What's New, ask for them per language on their screens. See Pages, blog and menus.
Plugins and themes
A plugin or a theme can bring its own files, plugins/<slug>/languages/<code>.php and themes/<slug>/languages/<code>.php, used while it is switched on. App Builder, Contact Form, Platform Requests, Reviews, Tools, What's New and the Nova theme ship all ten languages.
Their texts are not in the Translations list. To change one, look up its key in the languages/en.php of the plugin, then New translation with that key, the language and your wording.
Adding a language
- Optional: copy
languages/en.phptolanguages/<code>.php, translate the text on the right of every=>, and upload it. Do this before step 2, because switching on copies the file. - Admin → Languages → New language (or switch on Japanese, Korean, Chinese or Hindi). Give the code, the names, the direction and the flag.
- Admin → Translations, filter by the new language, and translate what is still English.
- Add the language to your pages, posts, categories and menus.