In the text below I propose a simple way to solve the Internationalization issues
1. Suppose that you have a e-commerce application. You want to show the product information (description, title etc) in english and portuguese.
A good way to accomplish this is to create the internationalized fields as many languages your application have.
i.e.
- You could have the title of the product mapped in 2 fields: title_pt, title_en
- The same thing could be done for description, the field name should be description_pt, description_en
I should have a special annotation to handle this kind of field, there you should only specify the field prefix (title and description in this case)
2. You have provide information about which languages your application handles, this could be done in the .cfg.xml file, where you specify the languages that you want to work and the field sufixes.
If a user want to extend the application to handle other language it should create the appropriate fields (i.e. if it wants to add the spanish, title_es and description_es fields should be created) and specify this in the configuration file.
As far I can see is this a good way and fast to provide internationalization.
I appreciate your attetion
Daniel
|