-
Server side localization
Hi,
Can I somehow make the ajax messages for the client localized?
I don't want JS to format currency to the users locale format and I do not want JS to translate statuses etc.
Is there any way to customize a message before it is sent to the client?
Best regards
Martin
-
The Metadata Adapter interface features the customizeUpdate method for this purpose.
The customization is driven only by the user name, not by local session properties, as the aim of the feature is to allow sending of user-specific data.
As long as the desired formatting depends on the user identity and not on session related formatting preferences, you can take advantage of this method.
Alternatively, you can differentiate the flow for different clients by assigning them different items.
Also in this case, the choice can be done entirely on the server side; the various clients can ask for the same item name and the Metadata Adapter can divert the requests to different items in getItems.
In this case, session related information is also available.
-
Thank you very much Dario. I will try as you explained.