WINDEV Concepts
140 Part 4: Advanced concept 4 Choosing the language through programming A multilingual application can be distributed in multiple languages. The user will be able to choose the language used by the application at runtime. You can for example: • prompt the user to choose the runtime language the first time the application is started • include an option (menu option or button, for example) to allow users to change the language while the application is running. 5 Defining specific character sets in HFSQL data files When an application displays or saves data in HFSQL data files, this data is typed in the current language. If the application is used in a country that uses a Latin character set, no specific configuration is required. If the application is used in a country that uses a specific character set, this character set must also be supported by the data files. This means that search, sort and other operations will be performed according to the selected character set. 6 Unicode and specific character sets WINDEV includes two modes: • single charset mode ("Use ANSI strings at runtime"): In this mode, if your application includes languages that use specific character sets (Greek, Korean, etc.), change the following elements through programming: • the character set used by all the fonts used on the screen ( ChangeCharset ). This character set can also be used for the data saved in the HFSQL files. For more details, see the online help (keyword: Multilingual). • the language of the keyboard used by the application users ( ChangeKeyboard ). • full Unicode support ("Use UNICODE strings at runtime"): This mode can be used for non-Latin character sets. In this mode, ChangeCharset and ChangeKeyboard don’t have any effect. The character set is automatically changed based on the language options defined in the project description. You can also combine different character sets. The Unicode options can be set in the current configuration ("Unicode" tab in the configuration description window). Important If you change your projects to Unicode, the ANSI/ Unicode combination generates some constraints: Data must be converted when changing from one encoding system to another. Any data exchange must be adapted depending on how strings are represented in memory (in Unicode, 1 character is encoded on 2 bytes, while in ANSI, it is encoded on 1 byte): for example, calls to APIs, read from or write to the disk to exchange data, read from or write to sockets containing strings, etc, ... If you change your projects to UNICODE, a wizard starts automatically to measure the impact of this change.
Made with FlippingBook
RkJQdWJsaXNoZXIy NDQ0OA==