Entity Translation

Entity Translation

whats the recommended way to translate texts in entity fields?

i couldnt find anything in the translations, only figured out how to translate static entities.

my problem: i can add a field like "LocaleID"
but then the EntityID of the translation is different to the original record

thank you!
Hello enigma

I don't know if I I understood your question. Translatable elements with OutSystems are elements which are passible of translation during compile time; that means, texts with values defined when programming. That is why the translatable elements are webpage content, text strings in actions, and similar elements.

Static elements are translatable because, despite their existance as "database tables", they are actually part of the development model - they being in a database table is just an implementation detail.
For regular entities, using the "translation" feature  is not possible because you cannot possible antecipate all values the table will contain.

You can have a LocaleID column in an entity, and make use of GetCurrentLocale() when querying the table, if you want to present localized text. But you will not be using the translation feature - you will be using the multiple-languages possibility to programatically show text in different languages based on the user locale.

If this is not what you meant, please let me know.
With best regards,

thanks for your reply acacio =)

i figured out the first part you described (element and static entity translation)

and i tried adding LocaleID to the entity i want to translate.
the problem i am having with this solution
is that ie. the entity ID in english, will not match the entity ID in spanish
now if the entity ID is referenced in another entity, it gets really messy =)

as you descibed, i agree, if ie. the customer creates a record with the text "chair"
it wont automatically be translated or so

the idea is to let the user manage the translations
and if ie. he wants to print something in french, which wasnt translated
it triggers the users default language ie. english

is it possible to set ID and LocaleID as the entity key?
so it would be possible to ie. have ID=1 as many times as there are languages
1 EN Chair
1 ES Silla
1 DE Stuhl
2 EN Table
Hi enigma,

Composed keys are not supported, but it your relational model is normalized then it becomes 2 tables: 1 with the actual data and then 1 with the translation lookups.

So something like:

1 Chair
2  Table
1 1 ES Silla
2 1 DE Stuhl
3 2 ES Mesa

And the second table can have a unique index with the 2 columns.
(or even putting the english there to be really normalized, but that way it would require a 2 seeks/joins for the second table instead of one)

João Rosado

thanks for the hin joao

so, for entity translation i require an according text-entity
which is referenced in the entity containing the coresponding data

Well thats at least how I would implement it :)

Theres always an alternative way to do anything.
indeed, many ways lead to rome =)

the down sides of the translation table, i found untill now:
- have to join/select 2 tables instead of 1 = less performance
- combobox not supported or requires a lot of workaround

the up side:
+ clean translation
+ if only needed to do calculations, the table is compact without any texts = better performance
Hi there,

Is there any way to translate for example a Static Attribute label that has a value "In Execution" for portuguese language "Em Execução"?

I know that we could have a Label_EN and a Label_PT attributes, but this will consume much more SU's and then we have to have a query to each screen to see the CurrentLocale.

We actually have a Multiligual Locale to pt-PT in our application and we can see that exists something like StaticRecordAttribueValue, we have made the translation but it seems to not work. This is the expected behaviour?

Platform Server 7.0


Best Reggards,
Hi Nuno,

In the Entity properties if you select "More...", there is a option in the "Advanced" tab called "Use Translations".
Select it and the resources you translated will work in runtime.

João Rosado
Hi João,

Thanks it works perfectly.