HB_LANGSELECT()
Select a specific nation message module
- Syntax
-
- HB_LANGSELECT(<cNewLang>) --> cOldLang
- Arguments
-
- <cNewLang> The ID of the country language module The possible values for <cNewLang> is below as is defined in the Lang library,sorted by language.
| <cNewLang> | Language | Codepage |
| EU | Basque | 850 |
| CS852 | Czech | 852 |
| CSISO | Czech | ISO-8859-2 |
| CSKAM | Czech | KAM |
| CA | Catalan | 850 |
| EN | English | 437 |
| FR | French | 850 |
| GL | Galician | 850 |
| DE | German | 850 |
| HE862 | Hebrew | 862 |
| HEWIN | Hebrew | 1255 |
| HU852 | Hungarian | 852 |
| HUCWI | Hungarian | CWI-2 |
| HUWIN | Hungarian | Windows-1 |
| IS85 | Icelandic | 850 |
| IT | Italian | 437 |
| KR | Korean | 949 |
| PL852 | Polish | 852 |
| PLISO | Polish | ISO-8859-1 |
| PLMAZ | Polish | Mozowia |
| PT | Portuguese | 850 |
| RO | Romanian | 852 |
| SRISO | Serbian | ISO-8859-2 |
| SR852 | Serbian | 852 |
| ES | Spanish | 850 |
- 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 as the current lang selected until another one is selected or the program ends.
Examples
REQUEST HB_LANG_PT
REQUEST HB_LANG_RO
REQUEST HB_LANG_ES
FUNCTION 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 Romanian
? CMONTH(DATE()) // Mayo
? CDOW(DATE()) // Lunes
Return nil
Tests
See tests/langapi.prg
- Status
- Ready
- Compliance
-
- This function is a Harbour Extension.
- Platforms
-
- Dos,Win32,OS/2
- Files
-
- Libraty is rtl
- See Also
|