AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Controles, páginas y ventanas / Funciones multilingües
  • Managing the languages and the character set
  • Nation function and file of error messages
  • Identifier of languages
  • Changing language
  • Change of language and Active WEBDEV Page
  • Change of language and help file
  • Change of language and User Groupware
  • Changing languages and framework messages
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Defines or identifies the display language (captions, messages, ...) used for the windows, pages, reports and controls.
This function enables you to develop international applications that can be broadcast in several languages.
Ejemplo
WINDEVReportes y ConsultasAndroidWidget Android JavaCódigo de Usuario (UMC)
// -- Choix menu: &Fichier..&Langues..&Anglais
// Changement de langue par menu
Nation(nationEnglish)
Use(FEN_MenuInt)
WEBDEV - Código ServidorPHPAjax
// -- Choix menu: &Fichier..&Langues..&Anglais
// Changement de langue par menu
Nation(nationEnglish)
// Réaffichage de la page d'accueil
PageUse(PAGE_PageAccueil)
WEBDEV - Código ServidorAjax
// Pages AWP sans contexte

// Code du bouton avec un drapeau Anglais
ScriptDisplay("../UK/Accueil.awp")

// Code du bouton avec un drapeau Français
ScriptDisplay("../FR/Accueil.awp")
Sintaxis

Modifying the runtime language Ocultar los detalles

Nation(<Language number>)
<Language number>: Integer or Integer constant
Identifier of language to use (value defined in the project editor).  This identifier can be returned by GetCountryList.
The list of identifiers is specified in the Remarks.
The change will be effective:
  • WINDEV immediately if "Cambiar el idioma inmediatamente después de llamar a la función Nation de WLanguage" is selected in the "Languages" tab of the project description.
  • WEBDEV - Código ServidorWEBDEV - Código NavegadorWINDEV Mobile when the next window or page is opened.

Retrieving the number of the current language Ocultar los detalles

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

Managing the languages and the character set

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

Nation function and file of error messages

LoadError is used to load the error message file in the desired 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
14nationPortuguese
Portuguese
15nationBrazilianPortuguese
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
42nationAfrikaans
Afrikaans
43nationBengali
Bengali
44nationBelarusian
Belorussian
45nationCatalan
Catalan
46nationIndonesian
Indonesian
47nationMacedonian
Macedonian
48nationPunjabi
Punjabi
49nationSindhi
Sindhi
50nationHindi
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:
    • WINDEV immediately if "Cambiar el idioma inmediatamente después de llamar a la función Nation de WLanguage" is selected in the "Languages" tab of the project description. If this option is not checked, the change of language will be performed when the next window is opened.
    • WEBDEV - Código ServidorWEBDEV - Código NavegadorWINDEV Mobile when the next window or page is opened.
    After calling the function Nation, windows, pages, ... display titles, labels, ... in the requested language.
  • To modify the language of the current window or page, you must:
    • WINDEV check "Cambiar el idioma inmediatamente después de llamar a la función Nation de WLanguage" in the "Languages" tab of the project description.
    • redisplay the relevant window (or page) with Use (or PageUse or FramesetUse), after the call to Nation.
    WEBDEV - Código Navegador 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(<Constante de la langue>)
    PageAffiche(<Nom de la page>)
  • Translation not found:
    If the translation of a window, page, message, etc. has not been carried out for the specified language (the element is not associated with that language), the preferred languages mechanism enables the desired information to be displayed in a language close to the one required.. For more details, see Managing the application language programmatically.
  • Changing language via a menu option:
    If the change of language is performed via a menu option:
    • WINDEV the menu language changes automatically if "Cambiar el idioma inmediatamente después de llamar a la función Nation de WLanguage" is checked in the "Languages" tab of the 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 - Código Servidor the relevant page with PageUse or FramesetUse after the call to Nation.
WEBDEV - Código ServidorAjax

Change of language and Active WEBDEV Page

To change the language of an Active WEBDEV Page, you must use Nation and display the desired Active WEBDEV Page.
WINDEV

Change of language and help file

In the WINDEV help editor, 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:
// Lancement de l'aide au format CHM
WHelp("MonFichier" + Nation + ".chm")
WINDEV

Change of language and User Groupware

If you're using User Groupware, windows specific to User Groupware are only available in 2 languages: English and French.
To change the language dynamically, you must configure the User Groupware specifically. For more details, see User Groupware and multilingual feature.

Changing languages and framework messages

The framework language automatically adapts to the application language defined by Nation. For example:
Nation(nationFrench) // framework en français 
Nation(nationFrenchCanadian) // framework en français
Nation(nationSpanish) // framework en espagnol
Nation(nationCatalan) // framework en espagnol
// Autres cas: 
// Nation(nationxxx): framework anglais
NationFramework allows you to force the use of one of the languages for the framework.
Componente: wd300vm.dll
Versión mínima requerida
  • Versión 9
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 24/09/2024

Señalar un error o enviar una sugerencia | Ayuda local