APEX 26.1 New Features. Message-Based App Translations

Search for a command to run...

No comments yet. Be the first to comment.
Context is one of the most important things when working with AI. That's kind of the agent "memory" during the session. A key part of the context giving the agent instructions on what to use for speci

A new Data Source was included in this release, you can see it when including a new component, it's called "Sample Data" Some components like maps, charts and Calendar have this source type now, that

This is a great combination for something the used to take some effort on writing some functions to execute actions on specific rows of an IR, like using a hidden page item, assigning the PK value of

Recently, I created an APP using APEXlang, (check here). I asked the agent to create a lookup table including columns to store colors and icons, useful to work with status for example. The agent no on

Creation of a parallel translated app is no longer the only way to handle multiple languages in APEX. Now under Globalization Attributes, we can select "Text Message-Based" as Translation Method.
Once that option is activated, We can navigate to Shared Components -> Application Translations
And click he "Add Language" button.
Once you select a Language, it will apear below. I just picked a group of languages.
Selecting one of the languages by clicking on the "Text Messages" number, we can see all the messages.
Using the first column we can select a Text Message to modify the actual value for that language.
In this page, we can also use the "Grid Edit" option, so we don't have to modify one record at the time.
This can be useful to update specific words and phrases.
Becase this is a new app, and to test how easy this can be, I'm going to export all Text Messages in one language in XLIFF format and check how we can translate multiple messages at the time.
Now I'll just click Export and the file is downloaded.
Why this format? because it looks a lot as XML, so maybe I could ask an agent to translate it for me.
Done, notice that it said "Placeholder phrases were left unchanged as requested" because in the prompt I said: "read only the current file. Translate all text inside a target tag to the target language of the file (Spanish), except for those words with a leading "%" like "%MAX_ROW_COUNT"
So I keep this placeholders:
Now, let's import back these messages, using the import tool
We just need to Drag and Drop the file here, and click Import.
Now, I'm going to check Text Messages for Spanish again, and I can see the translated values.
To change from the app language, I'm using a simple method (There are more). First I created an application item called FSP_LANGUAGE_PREFERENCE
Then, Added 3 new entries to the Navigation Bar List. One master "Language" entry with target type "URL" and target value "#" and 2 more for the languages, in this case English and Spanish, pointing to a page in the Application but page target is set to &APP_PAGE_ID. (current page)
Request is set to "LANG" and they set a value for the item FSP_LANGUAGE_PREFERENCE. "es" for Spanish and "en" for English.
Finally, under Shared Components -> Globalization Attributes, set the "Translation Language Derived From" value to: Item Preference.
Going back to my application Share components, Navigation Menu. I can see the Name column values were changed to Text Message format.
Ok! now I can change the language of the APP.
Once this is in place, I can keep adding components to my app and translate it to several languages without the need of dealing with multiple application copies. That simplifies the way we do it right now and makes the maintenance process a lot simpler and faster.