IupSetLanguage

Sets the language name used by some pre-defined dialogs. Can also be changed using the global attribute LANGUAGE.

Parameters/Return

void IupSetLanguage(const char *name); [in C] 
iup.SetLanguage(name: string) [in Lua]

name: Language name to be used. Can have one of the following values:

default: "ENGLISH".

Affects

All elements that have pre-defined texts. The pre-defined texts will be stored using IupSetLanguageString.

The native dialogs like IupFileDlg will always be displayed in the system language.

Even if the language is not supported (meaning its pack of pre-defined strings are not defined) the new language name will be successfully stored so you can set your own strings and return a coherent value, and the current defined string will not be changed.

Here is a list of the pre-defined string names:

IUP_ERROR               IUP_HELP
IUP_YES                 IUP_RED
IUP_NO                  IUP_GREEN
IUP_INVALIDDIR          IUP_BLUE
IUP_FILEISDIR           IUP_HUE
IUP_FILENOTEXIST        IUP_SATURATION
IUP_FILEOVERWRITE       IUP_INTENSITY
IUP_CREATEFOLDER        IUP_OPACITY
IUP_NAMENEWFOLDER       IUP_PALETTE
IUP_SAVEAS              IUP_TRUE
IUP_OPEN                IUP_FALSE
IUP_SELECTDIR           IUP_FAMILY
IUP_OK                  IUP_STYLE
IUP_CANCEL              IUP_SIZE
IUP_GETCOLOR            IUP_SAMPLE

Examples

#include "iup.h"

void main(void)
{
  IupOpen();
  IupSetLanguage("ENGLISH"); 
  IupMessage("IUP Language", IupGetLanguage());
  IupClose();
}

See Also

IupGetLanguage, IupSetLanguageString, LANGUAGE