PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Managing the languages and the character set
  • Nation function and file of error messages
  • Identifier of languages
  • Changing language
  • Change of language and AWP page
  • Change of language and help file
  • Change of language and user groupware
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Defines or identifies the display language (captions, messages, ...) used for the windows, pages, reports and controls. This function allows you to develop international applications that can be distributed in several languages.
Versions 15 and later
Android This function is now available for the Android applications.
PHP This function is now available for the PHP sites.
New in version 15
Android This function is now available for the Android applications.
PHP This function is now available for the PHP sites.
Android This function is now available for the Android applications.
PHP This function is now available for the PHP sites.
Versions 17 and later
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 17
iPhone/iPad This function is now available for the iPhone/iPad applications.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Versions 18 and later
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
New in version 18
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Versions 21 and later
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Example
WINDEVReports and QueriesAndroidAndroid Widget Windows MobileUniversal Windows 10 AppJavaUser code (UMC)
// -- Menu choice: &File..&Languages..&English
// Change the language via a menu
Nation(nationEnglish)
Use(WIN_IntMenu)
WEBDEV - Server codePHPAjax
// -- Menu choice: &File..&Languages..&English
// Change the language via a menu
Nation(nationEnglish)
// Redisplay the home page
PageUse(PAGE_HomePage)
WEBDEV - Server codeAjax
// AWP pages without context

// Code of the button with an English flag
ScriptDisplay("../UK/Home.awp")

// Code of button with French flag
ScriptDisplay("../FR/Home.awp")
Syntax

Modifying the runtime language Hide the details

Nation(<Language Number>)
<Language Number>: Integer or Integer constant
Identifier of language to use (value defined in the project editor).  
Versions 21 and later
This identifier can be returned by GetCountryList.
New in version 21
This identifier can be returned by GetCountryList.
This identifier can be returned by GetCountryList.
The list of identifiers is specified in the Remarks.
The change will be effective when the next window or page is opened. The change will be effective:
  • WINDEV immediately if the option "Change language immediately after the call to Nation" is selected in the "Advanced" tab of project description. WINDEV immediately if the option "Change language immediately after the call to Nation" is selected in the "Languages" tab of project description.
  • WEBDEV - Server codeWEBDEV - Browser codeWINDEV Mobile when the next window or page is opened.

Retrieving the number of the current language Hide the details

<Result> = Nation()
<Result>: Integer or Integer constant
Identifier of language currently used (see the Notes).
Remarks

Managing the languages and the character set

By default, the language in which the captions and messages are displayed corresponds to the default language, selected in the "Languages" tab of the description window of project ("Default language" from the popup menu of list of languages).
ChangeCharset allows you to find out and modify the character set used. When changing language (Nation), if the new language is using a different character set, this character set must be changed by ChangeCharset.
Versions 21 and later
To change the language of current system, use SysNation.
New in version 21
To change the language of current system, use SysNation.
To change the language of current system, use SysNation.

Nation function and file of error messages

LoadError is used to load the file of error messages in the requested language. This function is independent of Nation.
If an error file is available for each language supported by the application (or the site), this WDM file must be reloaded after each change of language performed by Nation.

Identifier of languages

The identifiers of languages are as follows:
IdentifierConstantLanguage
1nationGerman
German
2nationAmerican
American
3nationEnglish
English
4nationAustralian
Australian
5nationFrench
French
6nationDanish
Danish
7nationSpanish
Spanish
8nationFinnish
Finnish
9nationFrenchCanadian
French Canadian
10nationIcelandic
Icelandic
11nationItalian
Italian
12nationDutch
Dutch
13nationNorwegian
Norwegian
14nationPortuguesenationPortuguese
Portuguese
15nationBrazilianPortuguesenationBrazilianPortuguese
Brazilian Portuguese
16nationRussian
Russian
17nationSwedish
Swedish
18nationCzech
Czech
19nationArabic
Arabic
20nationBosniac
Bosnian
21nationBulgarian
Bulgarian
22nationTraditionalChinese
Chinese
23nationChinese
Simplified Chinese
24nationKorean
Korean
25nationCroatian
Croatian
26nationEstonian
Estonian
27nationGreek
Greek
28nationHebrew
Hebrew
29nationHungarian
Hungarian
30nationIrish
Irish
31nationJapanese
Japanese
32nationLatvian
Latvian
33nationLithuanian
Lithuanian
34nationPolish
Polish
35nationRomanian
Romanian
36nationSerbian
Serbian
37nationSlovak
Slovakian
38nationSlovenian
Slovenian
39nationThai
Thai
40nationTurkish
Turkish
41nationVietnamese
Vietnamese
42
Versions 16 and later
nationAfrikaans
New in version 16
nationAfrikaans
nationAfrikaans
Afrikaans
43
Versions 16 and later
nationBengali
New in version 16
nationBengali
nationBengali
Bengali
44
Versions 16 and later
nationBelarusian
New in version 16
nationBelarusian
nationBelarusian
Belorussian
45
Versions 16 and later
nationCatalan
New in version 16
nationCatalan
nationCatalan
Catalan
46
Versions 16 and later
nationIndonesian
New in version 16
nationIndonesian
nationIndonesian
Indonesian
47
Versions 16 and later
nationMacedonian
New in version 16
nationMacedonian
nationMacedonian
Macedonian
48
Versions 16 and later
nationPunjabi
New in version 16
nationPunjabi
nationPunjabi
Punjabi
49
Versions 16 and later
nationSindhi
New in version 16
nationSindhi
nationSindhi
Sindhi
50
Versions 17 and later
nationHindi
New in version 17
nationHindi
nationHindi
Hindi
Custom languages
201
Language 1
202
Language 2
203
Language 3
204
Language 4
205
Language 5
206
Language 6
207
Language 7
208
Language 8
209
Language 9
210
Language 10
211
Language 11
212
Language 12

Changing language

  • Nation changes the runtime language.
The change will be effective when the next window or page is opened. The change will be effective:
  • WINDEV immediately if the option "Change language immediately after the call to Nation" is selected in the "Advanced" tab of project description. If this option is not checked, the change of language will be performed when the next window is opened. WINDEV immediately if the option "Change language immediately after the call to Nation" is selected in the "Languages" tab of project description. If this option is not checked, the change of language will be performed when the next window is opened.
  • WEBDEV - Server codeWEBDEV - Browser codeWINDEV Mobile when the next window or page is opened.
After the call to Nation, the windows, the pages, ... display the titles, the captions, ... in the requested language.
To modify the language of current window or page, the window (or the page) must be redisplayed by Use (or by PageUse or FramesetUse) after the call to Nation.To modify the language of the current window or page, you must:
  • WINDEV check "Change language immediately after the call to Nation" in the "Advanced" tab of project description. WINDEV check "Change language immediately after the call to Nation" in the "Languages" tab of project description.
  • redisplay the relevant window (or page) with Use (or PageUse or FramesetUse), after the call to Nation.
WEBDEV - Browser code The change of language is available in the static pages and in the dynamic PHP pages. This change of language is taken into account during the next call to PageDisplay.
Example:
Nation(<Language Constant>)
PageDisplay(<Page Name>)
  • Translation not found: If the translation of a window, page, message, ... was not performed for the specified language (the element is not associated with this language), the mechanism of preferred languages is used to display the requested information in a language close to the requested one. See Managing the application language by programming for more details.
  • Changing language via a menu option: If the change of language is performed via a menu option, this menu remains in the language selected by default. To modify the menu language, you must redisplay:
    • WINDEVWINDEV Mobile the relevant window with Use after the call to Nation.
    • WEBDEV - Server code the relevant page with PageUse or FramesetUse after the call to Nation.
  • Changing language via a menu option: If the change of language is performed via a menu option:
    • WINDEV the menu automatically changes language if "Change language immediately after the call to Nation" is checked in the "Advanced" tab of project description. WINDEV the menu automatically changes language if "Change language immediately after the call to Nation" is checked in the "Languages" tab of project description.
    • the menu remains in the language selected by default. To modify the menu language, you must redisplay:
      • WINDEVWINDEV Mobile the relevant window with Use after the call to Nation.
      • WEBDEV - Server code the relevant page with PageUse or FramesetUse after the call to Nation.
WEBDEV - Server codeAjax

Change of language and AWP page

To change the language of an AWP page, you must use Nation and display the requested AWP page.
WINDEV

Change of language and help file

In the help editor of WINDEV, the name of the help file can be built from a numeric identifier corresponding to Nation.
In this case, to start the help file corresponding to the current language, all you have to do is use the following code:
// Start the help in CHM format
WHelp("MyFile" + Nation + ".chm")
WINDEV

Change of language and user groupware

If you are using the user groupware, the windows specific to the user groupware are supplied in two languages: French and English.
To change the language dynamically, you must configure the user groupware specifically. See User groupware and multilingual feature for more details.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230vm.dll
Windows Mobile wp230vm.dll
WEBDEV - Browser code WDJS.DLL
Java wd230java.jar
Linux wd230vm.so
Android wd230android.jar
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment