xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

NationMsg()

Returns application specific messages.

Syntax

NationMsg( <nMessageID> ) --> cMessage

Arguments

<nMessageID>
This is a numeric code identifying the message to retrieve.

Return

The function returns a character string identified by its numeric identifier according to the currently selected national language.

Description

NationMsg() is part of xHarbour's language specific system. The returned character string depemds on the currently selected national language (see HB_LangSelect()).

The function is used internally by text-mode commands and functions providing a user interface, such as @...GET, Browse() or MemoEdit(). Messages displayed by such commands and functions indicate the Insert/Overstrike mode during editing, or the Deleted flag of a database record. This information is retrieved internally with function NationMsg().

NationMsg() is available for programmers who want to replace built-in user interface functions and re-use the built-in national language messages.

Info

See also:HB_LangName(), HB_LangErrMsg(), HB_LangMessage(), HB_LangSelect()
Category: Language specific , xHarbour extensions
Source:rtl\natmsg.c
LIB:xhb.lib
DLL:xhbdll.dll

Example

// The example displays all available messages that can be retrieved
// from NationMsg() in English, French, German and Spanish language

   REQUEST HB_LANG_DE          // request German language
   REQUEST HB_LANG_ES          // request Spanish language
   REQUEST HB_LANG_FR          // request French language

   PROCEDURE Main
      LOCAL i

      CLS                      // English language
      ? HB_LangName()

      FOR i:=1 TO 13
         ? NationMsg(i)
      NEXT
      WAIT

      HB_LangSelect("FR")      // French language
      CLS
      ? HB_LangName()

      FOR i:=1 TO 13
         ? NationMsg(i)
      NEXT
      WAIT

      HB_LangSelect("DE")      // German language
      CLS
      ? HB_LangName()

      FOR i:=1 TO 13
         ? NationMsg(i)
      NEXT
      WAIT

      HB_LangSelect("ES")      // Spanish language
      CLS
      ? HB_LangName()

      FOR i:=1 TO 13
         ? NationMsg(i)
      NEXT
   RETURN

Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe