I have the Country
table (containing Name
and Code
columns) and I want users to be able to localize country names by themselves.
-
Right-click on the
Country
entity > Actions and select optionCreate Localization child entity...
:
-
In the next dialog select all fields that you need to be translated and confirm OK:
-
New
Country_l10n
entity, relationships and deployment scripts are created for you (as a child of the Country entity). Confirm Yes.
If you don’t like the captionCountry Localization
generated for this new entity, change it (e.g. “Translation”). -
In the
Country
data structure addCountry_l10n
as a child (right-click on the entityNew > Entity
). Use the “_all
” relation, if you want all languages to be added.
Create the screen section (Country_l10n > Actions > Create Screen Section...
) and selectrefLanguageId
andName
to be shown in the form.
Insert this new screen section into theCountry
screen as a child (by using the SplitPanel widget). -
Change
LookupCountry
data structure used for the selection of countries in screen sections so it will be localized:
- Set
IsLocalized=True
in the lookup data structure - Add the new child entity
Country_l10n
withAllFields=False
andRelationType=LeftJoin.
- Now users can add translations for every
Name
in the list.
In forms the data will be used according to the user or application language settings.
When there is no translation, the original value is used.