HB_LANGSELECT()
Select a specific nation message module
Syntax
HB_LANGSELECT( [ <cNewLang> ][, <cCodepage> ] ) --> cOldLang
Arguments
<cNewLang> The optional ID of the country language module. Possible values for <cNewLang> are below as defined in the Lang library, sorted by language. <cCodepage> Optional codepage ID into which the language module strings are automatically converted by Harbour.
Language <cNewLang> --------------------- ---------------------------------- Basque eu Belorussian be Bulgarian bg Catalan ca Chinese Simplified zh_sim Chinese Traditional zh_tra Croatian hr Czech cs Dutch nl Esperanto eo French fr Galician gl German de Greek el Hebrew he Hungarian hu Icelandic is Indonesian id Italian it Korean ko Lithuanian lt Polish pl Portuguese pt Romanian ro Russian ru Serbian (cyrillic) sr_cyr Serbian (latin) sr_lat Slovak sk Slovenian sl Spanish es Swedish sv Turkish tr Ukrainian uk
Returns
<cOldLang> The old language indentifier
Description
This function set a default language module for date/month names, internal warnigs, NatMsg messages and internal errors. When a Lang ID is selected all messages will be output with the current language selected until another one is selected or the program ends. The default language is English (cLang == “EN”).
NOTE: You must REQUEST every language module you intend to use. For example: to use the Russian RU866 language you must add the following to your program: REQUEST HB_LANG_RU866
Examples
REQUEST HB_LANG_PT REQUEST HB_LANG_RO REQUEST HB_LANG_ES PROCEDURE Main() HB_LANGSELECT( "pt" ) // Default language is now Portuguese ? CDOW( Date() ) // Segunda-feira ? "Old language id selected is ", HB_LANGSELECT() // PT HB_LANGSELECT( "ro" ) // Default language is now Romanian ? CMONTH( Date() ) // Mai ? "Old language id selected is ", HB_LANGSELECT() // RO HB_LANGSELECT( "es" ) // Default language is now Spanish ? CMONTH( Date() ) // Mayo ? CDOW( Date() ) // Lunes RETURN
Tests
See tests/langapi.prg, tests/langmsg.prg
Compliance
Harbour
Platforms
All
Files
Libraty are rtl, lang
Seealso
HB_LANGNAME(), HB_CDPSELECT(), NATIONMSG(), REQUEST
Pingback: Harbour All Functions – H | Viva Clipper !
Pingback: Harbour Language and Nation Functions | Viva Clipper !
Pingback: Harbour RG Summary | Viva Clipper !