Software Development Kit

cPanel & WHM's API [+] cPanel & WHM's API [-]


Modules and Plugins [+] Modules and Plugins [-]


cPanel & WHM Hooks [+] cPanel & WHM Hooks [-]


cPAddons (Site Software) [+] cPAddons (Site Software) [-]


System Administration [+] System Administration [-]


Developer Software [+] Developer Software [-]


Back to All Documentation



integrationblogcta.jpg

Locale Module Documentation

This module allows access into cPanel's language system

The functions within this module may or may not be governed by a feature list. The required feature list may vary from function to function, to review a total list of the available features sets on a cPanel server, please see "Feature Manager" in WHM.

Locale::get_encoding

API Version: 2 - Click here for documentation
Description: Retrieve a user's character set encoding.
Returns:  
 
<data>
  <encoding> The authenticated user's character set encoding (e.g. utf-8) </encoding>
</data>

Locale::get_user_locale

API Version: 2 - Click here for documentation
Description: Retrieve the user's locale ID tag.
Returns:  
 
<data>
  <locale> The authenticated user's locale identifier tag. (e.g. en, en_us, fr) </locale>
</data>

Locale::get_user_locale_name

API Version: 2 - Click here for documentation
Description: Retrieve the name the user's locale.
Returns:  
 
<data>
  <name> The name of the authenticated user's locale in the locale's language. (e.g. English) </name>
</data>

Locale::get_locale_name

API Version: 2 - Click here for documentation
Description: Retrieve the name of a locale in the authenticated user's language.
Parameters:  
  locale (string(optional))
  The locale to retrieve. This parameter defaults to the user's locale.
Returns:  
 
<data>
  <name> The name of the locale in the authenticated user's language. (e.g. English, French) </name>
</data>

Locale::get_html_dir_attr

API Version: 2 - Click here for documentation
Description: Retrieve the authenticated user's locale's directionality in HTML format.
Returns:  
 
<data>
  <dir> The locale's directionality (left-to-right or right-to-left) as a string to use with the HTML dir attribute. (e.g. 'rtl' or 'ltr') </dir>
</data>

Topic revision: r4 - 05 Feb 2013 - 13:12:52 - Main.StacyWyatt