<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">

<!-- THIS FILE IS GENERATED DO NOT EDIT -->


<erlref>
<header>
  <copyright>
    <year>2020</year><year>2021</year>
    <holder>wxWidgets team.</holder></copyright>
  <legalnotice>Licensed under the wxWindows Free Documentation Licence, Version 3
  </legalnotice>
  <title>wxLocale</title>
</header>
<module>wxLocale</module>
<modulesummary>Functions for wxLocale class</modulesummary>
<description><p><seeerl marker="wxLocale"><c>wxLocale</c></seeerl> class encapsulates all language-dependent settings and is a generalization of the C locale concept.
      </p><p>In wxWidgets this class manages current locale. It also initializes and activates <c>wxTranslations</c> (not implemented in wx) object that manages message catalogs.
      </p><p>For a list of the supported languages, please see ?wxLanguage enum values. These constants may be used to specify the language in <seemfa marker="#init/3"><c>init/3</c></seemfa> and are returned by <seemfa marker="#getSystemLanguage/0"><c>getSystemLanguage/0</c></seemfa>.
      </p><p>See: <url href="https://docs.wxwidgets.org/3.1/overview_i18n.html#overview_i18n">Overview i18n</url>, <url href="https://docs.wxwidgets.org/3.1/page_samples.html#page_samples_internat">Examples</url>, <c>wxXLocale</c> (not implemented in wx), <c>wxTranslations</c> (not implemented in wx)
      </p>
  <p>wxWidgets docs: <url href="https://docs.wxwidgets.org/3.1/classwx_locale.html">wxLocale</url></p>
  </description>
<datatypes><datatype><name name="wxLocale"/></datatype></datatypes>

<funcs>
  <func>
    <name name="new" arity="0" clause_i="1" since=""/>
    <fsummary>This is the default constructor and it does nothing to initialize the object: <c>init/3</c> must be used to do that. </fsummary>
    <desc><p>This is the default constructor and it does nothing to initialize the object: <seemfa marker="#init/3"><c>init/3</c></seemfa> must be used to do that. 
      </p></desc>
  </func>
  
  <func>
    <name name="new" arity="1" clause_i="1" since=""/>
  
    <name name="new" arity="1" clause_i="2" since=""/>
    <fsummary>See: <c>new/2</c></fsummary>
  </func>
  
  <func>
    <name name="new" arity="2" clause_i="1" since=""/>
  
    <name name="new" arity="2" clause_i="2" since=""/>
    <fsummary>See <c>init/3</c> for parameters description. </fsummary>
    <desc><p>See <seemfa marker="#init/3"><c>init/3</c></seemfa> for parameters description. 
      </p><p>The call of this function has several global side effects which you should understand: first of all, the application locale is changed - note that this will affect many of standard C library functions such as printf() or strftime(). Second, this <seeerl marker="wxLocale"><c>wxLocale</c></seeerl> object becomes the new current global locale for the application and so all subsequent calls to ?wxGetTranslation() will try to translate the messages using the message catalogs for this locale. 
      </p></desc>
  </func>
  
  <func>
    <name name="destroy" arity="1" clause_i="1" since=""/>
    <fsummary>The destructor, like the constructor, also has global side effects: the previously set locale is restored and so the changes described in <c>init/3</c> documentation are rolled back. </fsummary>
    <desc><p>The destructor, like the constructor, also has global side effects: the previously set locale is restored and so the changes described in <seemfa marker="#init/3"><c>init/3</c></seemfa> documentation are rolled back. 
      </p></desc>
  </func>
  
  <func>
    <name name="init" arity="1" clause_i="1" since=""/>
    <fsummary>See: <c>init/2</c></fsummary>
  </func>
  
  <func>
    <name name="init" arity="2" clause_i="1" since=""/>
    <fsummary>Initializes the <c>wxLocale</c> instance. </fsummary>
    <desc><p>Initializes the <seeerl marker="wxLocale"><c>wxLocale</c></seeerl> instance. 
      </p><p>The call of this function has several global side effects which you should understand: first of all, the application locale is changed - note that this will affect many of standard C library functions such as printf() or strftime(). Second, this <seeerl marker="wxLocale"><c>wxLocale</c></seeerl> object becomes the new current global locale for the application and so all subsequent calls to ?wxGetTranslation() will try to translate the messages using the message catalogs for this locale.
      </p><p>Return: true on success or false if the given locale couldn't be set. 
      </p></desc>
  </func>
  
  <func>
    <name name="init" arity="3" clause_i="1" since=""/>
    <fsummary/>
    <desc><p>Deprecated: This form is deprecated, use the other one unless you know what you are doing.
      
      </p></desc>
  </func>
  
  <func>
    <name name="addCatalog" arity="2" clause_i="1" since=""/>
    <fsummary>Calls wxTranslations::AddCatalog(const wxString&amp;). </fsummary>
    <desc><p>Calls wxTranslations::AddCatalog(const wxString&amp;). 
      </p></desc>
  </func>
  
  <func>
    <name name="addCatalog" arity="3" clause_i="1" since=""/>
    <fsummary>Calls <c>wxTranslations::AddCatalog(const wxString&amp;, wxLanguage)</c> (not implemented in wx). </fsummary>
    <desc><p>Calls <c>wxTranslations::AddCatalog(const wxString&amp;, wxLanguage)</c> (not implemented in wx). 
      </p></desc>
  </func>
  
  <func>
    <name name="addCatalog" arity="4" clause_i="1" since=""/>
    <fsummary>Calls <c>wxTranslations::AddCatalog(const wxString&amp;, wxLanguage, const wxString&amp;)</c> (not implemented in wx). </fsummary>
    <desc><p>Calls <c>wxTranslations::AddCatalog(const wxString&amp;, wxLanguage, const wxString&amp;)</c> (not implemented in wx). 
      </p></desc>
  </func>
  
  <func>
    <name name="addCatalogLookupPathPrefix" arity="1" clause_i="1" since=""/>
    <fsummary>Calls <c>wxFileTranslationsLoader::AddCatalogLookupPathPrefix()</c> (not implemented in wx). </fsummary>
    <desc><p>Calls <c>wxFileTranslationsLoader::AddCatalogLookupPathPrefix()</c> (not implemented in wx). 
      </p></desc>
  </func>
  
  <func>
    <name name="getCanonicalName" arity="1" clause_i="1" since=""/>
    <fsummary>Returns the canonical form of current locale name. </fsummary>
    <desc><p>Returns the canonical form of current locale name. 
      </p><p>Canonical form is the one that is used on UNIX systems: it is a two- or five-letter string in xx or xx_YY format, where xx is ISO 639 code of language and YY is ISO 3166 code of the country. Examples are "en", "en_GB", "en_US" or "fr_FR". This form is internally used when looking up message catalogs. Compare <seemfa marker="#getSysName/1"><c>getSysName/1</c></seemfa>. 
      </p></desc>
  </func>
  
  <func>
    <name name="getLanguage" arity="1" clause_i="1" since=""/>
    <fsummary>Returns the ?wxLanguage constant of current language. </fsummary>
    <desc><p>Returns the ?wxLanguage constant of current language. 
      </p><p>Note that you can call this function only if you used the form of <seemfa marker="#init/3"><c>init/3</c></seemfa> that takes ?wxLanguage argument. 
      </p></desc>
  </func>
  
  <func>
    <name name="getLanguageName" arity="1" clause_i="1" since=""/>
    <fsummary>Returns English name of the given language or empty string if this language is unknown. </fsummary>
    <desc><p>Returns English name of the given language or empty string if this language is unknown. 
      </p><p>See <c>GetLanguageInfo()</c> (not implemented in wx) for a remark about special meaning of <c>wxLANGUAGE_DEFAULT</c>. 
      </p></desc>
  </func>
  
  <func>
    <name name="getLocale" arity="1" clause_i="1" since=""/>
    <fsummary>Returns the locale name as passed to the constructor or <c>init/3</c>. </fsummary>
    <desc><p>Returns the locale name as passed to the constructor or <seemfa marker="#init/3"><c>init/3</c></seemfa>. 
      </p><p>This is a full, human-readable name, e.g. "English" or "French". 
      </p></desc>
  </func>
  
  <func>
    <name name="getName" arity="1" clause_i="1" since=""/>
    <fsummary>Returns the current short name for the locale (as given to the constructor or the <c>init/3</c> function). </fsummary>
    <desc><p>Returns the current short name for the locale (as given to the constructor or the <seemfa marker="#init/3"><c>init/3</c></seemfa> function). 
      </p></desc>
  </func>
  
  <func>
    <name name="getString" arity="2" clause_i="1" since=""/>
    <fsummary>See: <c>getString/3</c></fsummary>
  </func>
  
  <func>
    <name name="getString" arity="3" clause_i="1" since=""/>
    <fsummary>Calls wxGetTranslation(const wxString&amp;, const wxString&amp;). </fsummary>
    <desc><p>Calls wxGetTranslation(const wxString&amp;, const wxString&amp;). 
      </p></desc>
  </func>
  
  <func>
    <name name="getString" arity="4" clause_i="1" since=""/>
    <fsummary>See: <c>getString/5</c></fsummary>
  </func>
  
  <func>
    <name name="getString" arity="5" clause_i="1" since=""/>
    <fsummary>Calls wxGetTranslation(const wxString&amp;, const wxString&amp;, unsigned, const wxString&amp;). </fsummary>
    <desc><p>Calls wxGetTranslation(const wxString&amp;, const wxString&amp;, unsigned, const wxString&amp;). 
      </p></desc>
  </func>
  
  <func>
    <name name="getHeaderValue" arity="2" clause_i="1" since=""/>
    <fsummary>See: <c>getHeaderValue/3</c></fsummary>
  </func>
  
  <func>
    <name name="getHeaderValue" arity="3" clause_i="1" since=""/>
    <fsummary>Calls <c>wxTranslations::GetHeaderValue()</c> (not implemented in wx). </fsummary>
    <desc><p>Calls <c>wxTranslations::GetHeaderValue()</c> (not implemented in wx). 
      </p></desc>
  </func>
  
  <func>
    <name name="getSysName" arity="1" clause_i="1" since=""/>
    <fsummary>Returns current platform-specific locale name as passed to setlocale(). </fsummary>
    <desc><p>Returns current platform-specific locale name as passed to setlocale(). 
      </p><p>Compare <seemfa marker="#getCanonicalName/1"><c>getCanonicalName/1</c></seemfa>. 
      </p></desc>
  </func>
  
  <func>
    <name name="getSystemEncoding" arity="0" clause_i="1" since=""/>
    <fsummary>Tries to detect the user's default font encoding. </fsummary>
    <desc><p>Tries to detect the user's default font encoding. 
      </p><p>Returns ?wxFontEncoding() value or <c>wxFONTENCODING_SYSTEM</c> if it couldn't be determined. 
      </p></desc>
  </func>
  
  <func>
    <name name="getSystemEncodingName" arity="0" clause_i="1" since=""/>
    <fsummary>Tries to detect the name of the user's default font encoding. </fsummary>
    <desc><p>Tries to detect the name of the user's default font encoding. 
      </p><p>This string isn't particularly useful for the application as its form is platform-dependent and so you should probably use <seemfa marker="#getSystemEncoding/0"><c>getSystemEncoding/0</c></seemfa> instead.
      </p><p>Returns a user-readable string value or an empty string if it couldn't be determined. 
      </p></desc>
  </func>
  
  <func>
    <name name="getSystemLanguage" arity="0" clause_i="1" since=""/>
    <fsummary>Tries to detect the user's default locale setting. </fsummary>
    <desc><p>Tries to detect the user's default locale setting. 
      </p><p>Returns the ?wxLanguage value or <c>wxLANGUAGE_UNKNOWN</c> if the language-guessing algorithm failed.
      </p><p>Note: This function works with <c>locales</c> and returns the user's default locale. This may be, and usually is, the same as their preferred UI language, but it's not the same thing. Use wxTranslation to obtain <c>language</c> information.
      </p><p>See: <c>wxTranslations::GetBestTranslation()</c> (not implemented in wx)
      </p></desc>
  </func>
  
  <func>
    <name name="isLoaded" arity="2" clause_i="1" since=""/>
    <fsummary>Calls <c>wxTranslations::IsLoaded()</c> (not implemented in wx). </fsummary>
    <desc><p>Calls <c>wxTranslations::IsLoaded()</c> (not implemented in wx). 
      </p></desc>
  </func>
  
  <func>
    <name name="isOk" arity="1" clause_i="1" since=""/>
    <fsummary>Returns true if the locale could be set successfully. </fsummary>
    <desc><p>Returns true if the locale could be set successfully. 
      </p></desc>
  </func>
  </funcs>
</erlref>
