开发者

How to send alerts generated from core banking system in multiple languages?

开发者 https://www.devze.com 2023-04-04 10:10 出处:网络
I have to implement a solution which will translate the sms alerts generated from a core banking system into languages like \"Hindi\" and various Indian native languages.

I have to implement a solution which will translate the sms alerts generated from a core banking system into languages like "Hindi" and various Indian native languages.

What should be the approach provided I already have all types of aler开发者_开发知识库ts which are being sent currently in English.

Thanks in advance.


Use resource files and move the alert texts to them. Even if it's dynamically generated texts you should be able to extract the correct text using either conditional logic or a chain of responsibility type architecture.

Here is a good intro to resource files in .NET: resx on MSDN


I would suggest following approach

  1. Create different properties files for different language

  2. Store the various messages against the keys for alert types

  3. Use java.util.Properties instance to load all of these different files and store all of them in a map with the language as a key (This is all at start up).

  4. At the time of sending message, I assume that you already have a user's language preference (received say while user registration ).

  5. Now retrieve the java.util.Properties object from the map using the language key and the from that retrieve the message from the message key.

    I am aware of the standard resource bundle type approaches for full fledged web application. Since a SMS driven application will not have access to the the locale of the user, I could think of this approach.
    Please share any other specially standard approach if any.

EDIT : Seems I miss-read the question. What Gaurav want is to use language translation on the fly. But what I think is the banking system which being dealt with should not send messages in plain English but some type of status codes which can later be used to send messages in appropriate languages.

0

精彩评论

暂无评论...
验证码 换一张
取 消