Skip to content
Anjunar/ DOCS

Translation editor

Read and write exact inactive locales without replacing the managed entity's current language.

Access

Read an exact locale

The installed handle returns an exact override rather than a fallback value. None means the selected locale has no value for that field.

Read and write English

Use the field instance passed to install and a managed Page from that factory. This fragment runs in an active transaction of a German Session.

scala
val page = session.find(classOf[Page], pageId) val english: Option[String] = translations.get(session, page, titleField, "en") translations.set(session, page, titleField, "en", "Hello") // In a German Session, page.title keeps its loaded German value. // Edit that active language through page.title.
State

Separate editor rows and loaded fields

An inactive-locale edit does not replace already loaded domain state. If that row supplied a fallback, refresh or a new Session observes the changed fallback.

Clear the English override

null removes this field's exact value. Other translated fields in the same row remain until they are also cleared.

scala
translations.set(session, page, titleField, "en", null) // The active locale is written through its normal property: page.title = "Neuer deutscher Titel"
Use domain fields for the active locale

set rejects the Session's active locale. get may read it exactly, but writes belong to the managed domain property. Both operations require a managed entity and the installation's field instance.