Translations and languages
Every word the product shows, and every word it emails, is yours to change.
The interface is not written into the code. Each string has a key, and each key has a value you can replace from Interface text in the administration menu. That is the whole point of the layer: install the product in one language, then make it read the way your organisation writes, in whatever language that is.
Two languages ship: English and Mongolian. English is the default. You are not expected to use both. Most installations pick one, translate it to taste, and never show a language choice to anyone.
Editing text one string at a time
Open Interface text. The strings are grouped by where they appear, and the search box matches both the key and the text, so searching for the wording you saw on screen finds the field that produces it. Save writes your version; the original stays underneath as the default.
Your edits are stored separately from the shipped text. A new release can add strings and correct its own defaults without touching a word you have written.
Translating a whole language in a file
Editing over a thousand fields in a browser is the wrong way to produce a language. Use the file instead.
- Export. On Interface text, use Export. You get a
JSON file holding every key with the wording this installation currently serves, named for the
language and the release, for example
certiflow-en_US-1.0.0.json. - Translate. Replace the values, leave the keys alone. A value you do not
translate is simply left as it is. Anything after a colon, such as
:countor:course, is a placeholder the product fills in: keep it exactly as written, and move it inside the sentence as your grammar requires. - Preview. Upload the file with Preview only ticked. The screen reports how many strings would change, how many are already the same, any key that does not exist in this release, and any value it would refuse. Nothing is written.
- Import. Untick the preview box and upload again.
Import and export are available to the Admin role, are protected against cross-site submission, and are recorded in the audit log by count. The log never stores the text.
Adding a language the package does not ship
Set the language code field when you import, and that language is added to
the installation. Write it as de_DE, de-DE or just de:
all three mean the same thing and are stored the same way. Give it a name as well, such as
Deutsch, and that is what the interface calls it.
A language added this way has no file in the package, so its text lives in this installation only. Keep the file you imported: it is your backup, and it is what you would carry to another server. Two things follow from having no shipped file:
- A key you have not translated reads in the reference language, English by default, rather than as a raw identifier. Nothing is ever blank.
- A release that adds strings adds them in the reference language. Export, translate the new strings, and import again. The preview tells you how many there are.
Removing a language you added takes it out of the list and keeps its text, so importing it again brings the translation back.
Choosing the language an installation runs in
- During installation, choose the language in the application settings step. The installer writes it as
APP_LOCALE. - New installations carry
APP_LOCALE_FROM_BROWSER=false, so an English browser does not silently replace your selected site language. - To change an existing site, back up its private
.env, then setAPP_LOCALE=mnfor Mongolian orAPP_LOCALE=enfor English, and addAPP_LOCALE_FROM_BROWSER=false. Preserve every other setting. Never upload a replacement example file over your live configuration. - Open the site in a fresh private window using a browser configured for another language. The site should still show your chosen language. No migration or database reset is required.
If you want the browser to choose instead, set APP_LOCALE_FROM_BROWSER=true. Older installations with this option omitted keep their previous browser negotiation. The order is: account preference, explicit session choice, browser language when enabled, then the site default. An existing session or account set to English must select Mongolian or sign out and start a fresh session to see the site default.
The header switcher and translation editor do not change the site default. The switcher chooses a language for the session; the editor changes wording within a language. Preserve files under storage/translations/ during every upgrade.
APP_LOCALE in the .env file sets the language a visitor sees before
anyone chooses anything. APP_FALLBACK_LOCALE sets where a missing string is served
from, and a gap is written to the log so it can be found. The
configuration reference lists both.
Each account can also pick its own language on its profile screen, which is what a mixed team needs.
The language choice in the header
It is off by default, and it is a setting on Interface text rather than something that appears because more than one language exists. An installation that works in one language has nothing to switch to, and on a public certificate page a second language would show a stranger wording nobody proof-read. Turn it on where the installation genuinely serves two audiences, for example a Mongolian register whose certificates are checked by employers abroad.
Every message the product sends is built from the same strings, so translating the interface translates the email. Email settings shows each subject and body with a preview; see email and templates.
What the file may hold
| Rule | Why |
|---|---|
| JSON only, up to 2 MB | A translation file is data. The product never executes an uploaded file. |
| The keys must be keys this release defines | A key from a newer or older release is reported by name and ignored, rather than stored where nothing will read it. |
| A value may not be empty | An empty value would leave a blank label on a screen. The reference wording stays instead. |
| Up to 5,000 characters a value, no control characters | The same limit the editor applies, so a file cannot put something in that the editor would refuse. |
Whatever a file gets wrong is reported by key. A file that fails as a whole says which rule it broke.