The .INI solution
In that solution, the entire set of language strings is stored in an external application.INI file.
If the application is distributed without the ini file, there is only one language for that application, but as soon as the application is launched, the ini file is generated for that single language, and it can be translated.
rationale:
Exposing the strings to the public may not always be desirable from the programmer's standpoint (some may not want these to be changed, and this technique is slower that embedding messages in code--though not very much slower), but externalizing them allows end users to either add new languages or modify any of the current strings without the need to recompile the mbx. This lets net users exchange translations without bothering the programmers, and MLC applications can spread throughout the world faster even though some developers know only one language.
Using ini files allows anybody without programming knowledge to play a role in this project and does not require using a compiling tool; with a simple word processor, anyone can add his own language.
NOTES TO USERS
If the application comes with only the main MBX file, an INI file will be created at first use with the language used originally by the programmer.
The INI file must be located in the directory as the MBX.
If the INI file does not contain the language you want, simply add its 'translated' strings to it as detailed below, and save the file. The new language will become immediately available, even if the application is already loaded.
If the user does not want that all the languages be available, he can simply edit the INI file, by removing the 'language blocks' and adjusting the parameters (number of languages and language indices in each remaining blocks). WARNING : this is a risky operation if it entails many corrections.
NOTES TO TRANSLATORS
Most of this text in various languages is also available in RTF format in the MNI_TR_SET.zip file that is regularly updated.
The simplest way to add a language is to work directly on the INI file, adding the necessary lines and adjusting the required parameters. To do it properly, the translator must understand the INI file structure, have a precise way of proceeding and run the application to make sure of the quality of his work.
In order to make the entire MI community benefit from his work, the translator should send the expanded INI file to the application's author who will include it for general distribution.
The translator is also encouraged to write a short presentation text of the application similar to the 'more...' texts available on this site.
INI FILE STRUCTURE
The ini file is composed of blocks, one general and two for each language
The general contains two parameters: the index of the currently selected language and the number of languages. In the case of a single language, this block will read as follows:
[General]
LanguagePreference=1
Languages=1
A language block begins with the language index, the language name and all the text strings required in the application. The first bloc of strings are specific to the application; those listed after the [MLC ] heading are the same for all MLC applications.
[Language1]
Name=
msg1=Message string 1
msg2=Message string 2
...
msgN=Message string N
[MLC1]
msg1=Message string 1
msg2=Message string 2
msg3=Message string 3
ADDING A LANGUAGE
We assume that m is the number of already existing languages
1 - update in [General]
Languages=m to Languages=m+1
2 - create a new block at the end of the file
[Language(m+1)]
Name=
msg1=Message in new language string 1
msg2=Message in new language string 2
...
msgn=Message in new language string N
[MLC(m+1)]
msg1=Message string 1
msg2=Message string 2
msg3=Message string 3
3 - Translate the strings to your new language
RECOMMENDATIONS
1 - it is simpler and more secure to simply copy and paste the entire block of the language from which you will translate, then adjusting parameters and strings. That way, no string definition will be forgotten.
2 - make the length of the translated strings as close as possible to the original ones.
3 - if you want the application to open immediately in the new language when loading the application,
update in [General] LanguagePreference=m to LanguagePreference=m+1
where m+1 is the index of the new language
4 - run the program to find if lengths must be adjusted before closing the project
USING SOME HELP
There is a utility that can be helpful in the translation and the upkeep of INI_for_MLC files. It can be used to add a new language or to correct an existing one. The user does not any external text editor and does not have to know anything about the structure of the INI files.
This utility named MlcIniTr is available on this site.
NOTES TO DEVELOPERS
The principles of the MLC_INI solution are implemented in as a set of MB subroutine libraries and a main pdf document; a complete and documented example is also offered. All these elements are found in the Mlc_Ini_Kit.zip file.
You can consult the MLC_INI_KIT.pdf document directly from here