int DeviceGetLocaleID(char *localeid, int len);

 

Gets a value that represents the currently selected language and regional settings.

 

Return Value

 

Returns a non-zero value if the call was successful, zero otherwise.

 

Parameters

 

localeid

Pointer to a character buffer to receive the locale information.

 

len

Specifies the length of the buffer pointed to by localeid.

 

Remarks

 

DeviceGetLocaleID() populates a buffer with a string that represents the language and regional settings selected by the user in the device's Settings application.  The string is formatted as a language identifier, followed by an underscore character, followed by a country or region code.

 

Some examples of Locale ID's that may be returned by this function:

 

Locale ID

Language

Regional Settings

en_US

English

USA

de_CH

German

Switzerland

fr_CA

French

Canada

es_MX

Spanish

Mexico

 

Windows Simulator NOTE: To provide values for the Windows Simulator, be sure to edit C:\DragonFireSDK\DragonFireSDK.ini and modify the value for LocaleID in the Device section.

 

Availability

 

Available in DragonFireSDK 1.4 and later.

 

Example

 

#include "DragonFireSDK.h"

 

int MyFont;

int LocaleIDText;

 

char ValueText[50];

char TextBuffer[100];

 

void AppMain()

{  

  LandscapeMode();

 

  MyFont = FontAdd("Helvetica", "Regular", 18, 0x00FF00);

 

  DeviceGetLocaleID(ValueText, 50);

  sprintf(TextBuffer, "Locale ID: %s", ValueText);

  LocaleIDText = TextAdd(10, 10, TextBuffer, MyFont);

}

 

//===============================================

void OnTimer()

{

 

}

 

//===============================================

void AppExit()

{

 

}