Good morning everyone,
I have a problem with translation formatting. If the text wraps I can't manage it in the same way in translations.
So if a text wraps like the attachment it will result in a single string in the translation.
Is there a way to preserve the initial text formatting?
A thousand thanks
Giacomo
You could try to split the message into separate strings for translating. This way you can easily format the message to your likings.
'Dear User,'
'If you don't...' up until '...provisions of your company.'
'For any problems, please refer to the competent body of your company.'
I have a lot of text that wraps inside the application and it would be a really long job to do. But if there is no other way we will continue in this way...
If you really have that many texts to display in the application, you could try to create separate translation logic. (Your own translation module/application).
Create entities where you can save texts (and in what language they are) and have some logic defined that fetches the correct translation if found, or the default.
Have screens/webblocks to add/manage/remove translations.
Entities could be something like this:
Entity 1: TranslationTag- Id (automatic OutSystems long identifier)- Tag (type: text, i.e. "DisclaimerRegister")- Default (type: text, 2000 length, or a bit shorter if you want)
Entity 2: Translation- Id (automatic OutSystems long identifier)- TranslationTagId (foreign key to the Id parameter of TranslationTag)- Locale (type: text, 5 length or a bit longer, i.e. "it-IT")- Translation (type: text, 2000 length, same as TranslationTag.Default length)
Have a function defined like: FetchTranslation, with two input variables Tag and Locale (both type Text) and an output variable of type text.Then you can do something like within the Expression in your screen FetchTranslation("DisclaimerRegister", "it-IT")
You could even add another attribute to the TranslationTag entity, to link the specific Espace or Application Identifier, then you can even use this translation application for other applications.