Hi,
The Appian Playbook https://community.appian.com/w/the-appian-playbook/100/application-internationalization suggest this for record list views
"Internationalized apps need to use an expression-backed record to load the bundle once and pass the bundle into an element of the record source CDT. In the record list view the bundle element of the source CDT can be referenced to internationalize labels and data in the list view."
This is not clear what exactly we need to do. I think its suggesting we add a "bundle" field to CDT definition but not sure. Can anyone clarify or provide reference to example of what the practice is recommending?
Discussion posts and replies are publicly visible
Hi Bob
For better context, any mention of a "bundle" is in the context of the `load resource bundle` plugin.
The plugin enables the product to interact easily with "bundle" files by exposing some functions (detailed on the plugin page).Bundles are essentially lists of key/value pairs. Typically, there is one bundle per language, and any text that needs to be translated is wrapped in expressions to tell Appian which word or phrase to display from the given bundle.
https://community.appian.com/b/appmarket/posts/load-resource-bundle
Hi Robert,
Sorry my question wasn't clear, we understand we need to load a bundle as you described, however how to we reference the resource bundle when setting column labels in the record list view or labels for action/related action buttons for example?
You can i18nize any component which includes an expressionable display element (i.e. a label).
Ideally on an interface, you can load the bundle into a variable and then index out the value like so:
label:index(local!i18n_bundle, "firstName", "First Name")
where local!i18n_bundle is the bundle, "firstName" is the key, and "First Name" is the default display value in the event that no value matches that key.
Were there use cases in which you don't have the luxury of loading your bundle in advance, I suppose you can do it on the fly:
label:index(rule!i18n_loadBundleFromFolder(cons!someFolder), "firstName", "First Name"),
We understand the strategy to use resource bundles and create a local variables in the context of an interface object. It's still not clear how to load the bundle once and use it throughout the record type designer interface. How do we define a variable, as suggested in the playbook, inside the record list view expression and use the variable throughout the record type designer (record list definition, related action button labels).
Or are you suggesting we need to reload the bundle inside every column label and related action button using expressions? If so then the playbook recommendation doesn't make any sense:"Internationalized apps need to use an expression-backed record to load the bundle once and pass the bundle into an element of the record source CDT. In the record list view the bundle element of the source CDT can be referenced to internationalize labels and data in the list view"
Thanks.
Bob and I are aware of how to use Resource Bundles via the loadbundle plugin. At issue here are two things: the fact that there is no way to efficiently load a bundle for the grid/list views in an Entity-backed record (essentially we'd need to load the bundle for every item - which seems innefficent). And, the wording of the instructions that Bob quoted. What is meant by passing the bundle into an element of the record source CDT. This is not clear to me.
I think you might be overlooking the part that specifies "expression-backed record". Using this method, you'd presumably be able to transform any data in the background prior to it reaching the OOB record type definition (column names, labels, etc).
We do understand that part, the issues is particularly in the wording that Bob has highlighted....