Here in this message I'm presenting one idea, to put several languages in one INI file and sections by each language.
But this way will demand to a necessary attached INI file with exe file of our applications.
Another idea, given by Claudio, is to make it by INCLUDE file with an array of each message.
Then all these definitions/xtranslate will make part of builded application.
I have been thinking a lot about it and I see a way to do it time before when at moment of building applications.
Programmer will choose by selective option which language is being include as default language in unique file but containing according the choosen language.
Suggestions are very good wellcome. My wish and I believe of many other is to get clean code of our HMG not being part of our source code. IMHO this just a dictionary for interface texts and messages for each languages.
My suggestion is to take both ideas and join it as folows:
- In my mind I'm thinking to collect all HMG texts and messages for interface and make a indexed file.
This we could named as "Dictionary.ch" and at beginning with English text inside as default.
- To be created a single INI file containing its text of each languages. Like this (for example):
And this INI file we can named as "Languages.lng" - At moment of building app. Will need to choose by selecting language option or reading by enviroment variable pre-defined language. In this way, a HMG tool could extract only the selected/defined language a make copy to "Dictionary.ch" file.
This selecting option of language, it could be done in our IDE and also actioning by Build.bat at prompt command.
All of this is just an idea.
Everyone is invited to make your participation.
Probably we can collect many ideas to get better solution for this.
Regards