text_l10n, text_l10n_oneline
The types text_l10n
and text_l10n_oneline
are designed to store localized values. The format is a JSON object consisting of the language as key and the text as value.
API
Localized text looks like this send and received over the API.
The above example set the German value German and English value English for column title_loca
.
The API is not checking the passed language. So, load and save of an unconfigured database language is supported.
Index
Indexing is done the same way text
format is indexed. Only enabled database languages are mapped into the index, other languages are ignored. After changing the settings for the database languages a reindex is required.
Sorting
Sorting is performed using a collate string produced by the Go library collate. The language is parsed as BCP 47 string and passed to the library. Some special replacement is done:
Export
XML exported data looks like this:
The example shows the XML snippet for a column title_loca
with the type text_l10n
.
In CSV the values are exported like this:
German
English
For each language exported a suffix .<code>
is added to the column name.
Last updated