Is there anyone who can tell me how I can resolve/include multi language feature in my Add-on solution.
How do the professional do it. Like ScreenPainter from SAP - which have only few add-on files.
We think about different solutions:
Save different *.srf - userform with various language and load the different form through XML.
Happy to hear from anyone who have any tip (maybe small code example) on how we best can do this.
this is the solution we used for our Add-On, it may not be the best one, and I'm interesting to know what the solution used by the other people from this forum too.
all our forms are defined in xml files, in a default folder
We have a default form, without caption but code instead, like captionUID1, captionUID2....
all the caption are stored in a ressource file, we have one ressource file for each language.
the idea is to replace all the code in the xml file by the good caption in the ressource file the first time the form is opened in the application, and store this file with good caption in a folder (like EN for english caption)
One good solution is to change all the strings in srf file to some STRING_ID, then use a file that contain all the languages specific strings. When loading the srf file in your code, get and update the string according to STRING_ID and language.
That's a flexible way, and also be used by some SAP Add-ons.
1. (Like you said) - Save different *.srf - userform with various language and load the different form through XML
2. Have an .ini file with the varouis language translations for the word and load it depending on the company language
3. Build a user defined table with translations - load it depending on the company language.
The advantage here is that the user can update their own language (in regards to spelling - etc. You can even set up error messages here). You can even add the functionality for users to define a new language using your table structure.