hb_langSelect()

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

Advertisements

3 responses to “hb_langSelect()

  1. Pingback: Harbour All Functions – H | Viva Clipper !

  2. Pingback: Harbour Language and Nation Functions | Viva Clipper !

  3. Pingback: Harbour RG Summary | Viva Clipper !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s