Docs/Portal & branding/Languages
DartRelay 2.1 documentation
Portal & branding

Languages

The portal can speak your users' languages. It picks a language from each visitor's browser, falls back to one you choose, and lets people choose for themselves. Every word of the portal can be edited, and the text you write in themes, announcements and agreements can be written in several languages too.

What can be translated

TextTranslated?Where
The portal's own words: buttons, labels, messages, the sign-in page, the home page, the profile pageYesAppearance → Languages
Words you type into theme blocks (headings, text, the sign-in form's labels, buttons)YesThe block's language menu, see below
Announcement headings and bodiesYesThe announcement editor
Agreement titles, bodies and button labelsYesThe Agreement editor
The administrator consoleNo – English only—

How the portal chooses a language

For each visitor the portal tries, in order:

  1. the language the person chose on their profile page (remembered in that browser);
  2. the languages their browser asks for, best first;
  3. the default language you set on the Languages page;
  4. English, which is built in and always available.

Only languages that are switched on are considered. A regional language falls back to its base: a browser asking for Canadian French (fr-CA) gets French (fr) if you have no Canadian French. If a language is only partly translated, each missing phrase falls back to the default language and then to English, so nobody ever sees a blank button.

The Languages page

Go to Appearance → Languages. A Localization card at the top holds the main switch. Below it, the list shows each language with these columns: Language, Code, Translated (a progress bar showing how many portal phrases have a translation), Enabled, Default, and Actions.

The languages that come with DartRelay

LanguageCodeState when installed
EnglishenBuilt in, always on, cannot be deleted
English (United States), English (United Kingdom)en-US, en-GBPresent, switched off, no translations (the built-in English is used)
Dutch, Spanish, French, Germannl, es, fr, deFully translated, switched off

The Dutch, Spanish, French and German translations are machine translations, prepared with consistent terminology and a formal register. They arrive switched off so that you can read them, and correct anything that does not suit your organisation, before turning them on. English shows no progress in the list because it is built in rather than translated.

Turn on a language

  1. Open the Languages page. Go to Appearance → Languages.
  2. Review the translation. Click the language's edit action. Read through the phrases, particularly the ones you will see most (sign-in, Launch, Favourites, search), and change any wording. Save.
  3. Switch it on. Back on the list, enable the language.
  4. Check it. Set a browser to that language, or choose it on your portal profile page, and open the portal. The sign-in page, home page and profile page should appear in that language.
Tip

Leave a language switched off until its translation is complete. A switched-on language with missing phrases still works, but mixes in English and tells screen readers the page is in a language it is only partly written in.

Set the default language

The default language is what visitors get when their browser asks for nothing you offer. Set it on the Languages page by marking a switched-on language as Default.

Switching localization off

Turn the switch on the Localization card off to give everybody one language: the one marked Default. Browsers are not matched, the language menu disappears from people's profile pages, and choices people made earlier are kept (not erased) for when you turn it back on. Nothing is deleted, so it is safe to try. Date format and time zone still apply.

Edit a language's phrases

Click a language's edit action to open its editor. It has the language's properties and, below them, every portal phrase with its English text and a note for translators explaining where the phrase appears.

FieldWhat it doesDefault
CodeThe language code, such as fr or pt-BR. Browsers are matched on it. English's code cannot be changed.—
NameThe name shown in the console, such as "French".—
Native nameThe name people see in the portal's language menu, such as "Français".—
OrderPosition in the language menu.—
Switched onWhether the language is offered. English is always on.Off for new languages
Right-to-leftFor languages such as Arabic and Hebrew. Text direction and reading order flip; not every part of the page layout is mirrored.Off

To change the portal's wording in English (for example to say "applications" instead of "resources"), edit English's phrases: your text replaces the built-in text. Leave a box empty to use the built-in text again.

Some phrases contain placeholders such as {0} and {1}, which the portal fills with a name or a number. Keep every placeholder in your translation; you may move them to suit the sentence.

Add a new language

  1. Add it. On the Languages page, add a language and fill in its code, name and native name. It is created switched off.
  2. Translate it. Either type the translations into its editor, or export a pack, have it translated and import it (see below).
  3. Switch it on when the translation is complete.

Language packs: export and import

A language pack is a JSON file holding one language's translations. Use packs to send the portal's wording to a professional translator, to keep a copy, or to copy translations between installations.

Note

When a new DartRelay release adds portal phrases, they appear in English in every language until they are translated. The shipped translations are applied once, when a language is first set up, and never overwrite your edits. To pick up translations for new phrases, import the language's pack again; importing merges and keeps your changes.

Date format and time zone

Dates and times on the portal (for example an announcement's publish date) follow two settings in System → Settings, under Date and Time:

SettingChoicesDefault
Date formatMatch the language, dd/MM/yyyy, MM/dd/yyyy, yyyy-MM-dd, d MMM yyyy, MMM d, yyyy. Month names follow the person's language.Match the language
Time zoneAny time zone. 12- or 24-hour time follows the language.The server's own time zone

People can choose their own language, date format and time zone on their portal profile page; their choice is remembered in that browser.

Translating your own content

The text you write yourself can be written in each switched-on language. This works the same way in the theme block builder, the announcement editor and the Agreement editor:

  1. Write the Original. Every translatable box has a small language menu above it, starting on Original. Write your main text there. The Original is shown to anybody whose language has no version of its own, so it must always be complete.
  2. Pick a language. Choose a language from the menu. Languages with no text yet are marked "not written".
  3. Write that version. Type the text for that language. Switch between languages as often as you like; nothing is lost.
  4. Save. Save the theme, announcement or Agreement as usual.

A visitor sees their language's version, or its base language's (French for Canadian French), or else the Original. If you switch a language off, its versions stop being shown but are kept; in theme blocks they stay visible in the menu marked "switched off" so you can clear them.

Important

Changing a language's code later disconnects the content already written for the old code. Choose codes carefully, and avoid renaming them once content has been translated.

Example: a bilingual portal

A Belgian company wants its portal in Dutch and French, with French as the fallback.

  1. Review. Open Dutch and French on the Languages page and have a native speaker of each read the phrases. Correct any wording.
  2. Switch on. Enable both, and mark French as Default.
  3. Theme. In the theme's sign-in page, open the Heading block, write "Welcome" as the Original, then choose Nederlands and type "Welkom", and Français and type "Bienvenue".
  4. Agreement. Write the terms of use in the Original, then add Dutch and French versions.
  5. Result. A browser set to Dutch sees Dutch throughout; a browser set to German sees French, the default, for the portal's own words and the Original for your content.

If something goes wrong

The portal is still in English for a visitor

My heading is in English although the portal is in French

The block has no French version, so the Original is shown. Add a French version in the block's language menu.

A translated line is missing a name or number

The translation has lost a placeholder such as {0}. Edit the phrase and put it back.

New features show English words in a translated portal

The release added phrases that have not been translated on your installation yet. Translate them in the editor, or import an updated language pack.

Still stuck? Email support@dartinnovations.com with what you were doing, what you expected and what you saw. A screenshot helps.