Help topics

Languages settings

The Languages tab in Settings sets the languages that Morphic stores for the site. Only administrators can open Settings.

Languages tab

SettingWhat it doesOptionsDefault
Language code (first box)Sets the key for the language, such as fr or pt-br. Morphic trims it and lowercases it on save.Two or three letters, optionally followed by - and two to eight letters or digitsEmpty for a new row. When nothing is stored, the first language is the site locale's first two letters, lowercased, or en
Name (second box)Sets the label for the language. Morphic cuts it to 60 characters.Any textThe uppercase code, such as FR
DefaultMarks the first row as the default language. The default holds the normal field values.First row onlyFirst row
RemoveRemoves a row. It does not appear on the first row.Not available on the first rowNot applicable

Morphic keeps the first of any rows that share a code and drops the later rows without an error. Rows with an empty code are not saved.

The list needs at least one language and accepts at most 100 languages. Morphic counts languages after it drops duplicates.

Add, change and save languages

The Add language button adds an empty row. Each row has a code box and a name box, and you can edit both. The Save languages button stores the list. Morphic then shows the toast "Languages saved" and redraws the tab with the saved list.

Errors

MessageCauseFix
language codes look like en, fr or pt-brA code does not match the code formatEnter a code with two or three letters, optionally followed by - and two to eight letters or digits
keep at least one languageThe list is empty after empty rows are droppedAdd at least one row with a code
at most 100 languagesThe list has more than 100 languages after duplicates are droppedRemove languages until 100 or fewer remain

Stored values

Morphic stores the list in the morphic_languages option. If nothing is stored, or the stored value is not a list of rows with a text code and name, Morphic uses one language. That language is the first two letters of the site locale, lowercased, with the uppercase code as its name. If the locale gives no letters, the code is en.

After you save the list, Morphic updates the web addresses of its pages on the next page load.