![]() reg file to install the values on each computer, but that's a relatively complex process. You can use the RegEdit program to export the part of the registry containing your strings and then "execute" the. Unfortunately it requires that you store the information in the registry. LblName.Caption = GetSetting(App.ProductName, _ If the string variable g_Language stores the language you are using, the program can use code like this to get a label's value: ![]() You can store the strings using a different key section for each language. Resource files provide the greatest flexibility without too much more effort than the other methods, though each has its strengths and weaknesses and the others may be useful for very small projects. ![]() ![]() There are several places you can store the strings an application will use. For example, when the user clicks on a CheckBox, you cannot determine which box it is by testing its caption. Third, you cannot use these string values in the code. In the end, you will need to test the program in each of the languages it uses to verify that everything fits in all languages. You need to allow room for the longest value you will display. For example, a tiny "Ok" button in English may not be big enough to hold "Aceptar" in Spanish. Second, the same things can take longer to say in one language than in another. You will need to handle these strings using only functions that can handle 2-byte wide Unicode characters. First, depending on the languages you will support, you may need to use Unicode strings. There are several issues to keep in mind when you use strings like this. The program must also be able to change accelerators, shortcuts, pictures, icons, and other graphics for different languages. The program must be able to change the strings displayed on labels, menus, buttons, and other user interface elements depending on the language selected. One of the first things you should do when building an international application is to separate the user interface's string values from the application code. ![]() See also the tutorial International Character Sets. This article also contains reader-contributed tips and tricks for building international programs. I have not personally worked on international applications so my comments are theoretical and not drawn from personal experience. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |