cPanel/Locale
cPanel module

Locale

3 functions, invoked through the cpanel_uapi tool.

scope cpanel:uapi
Call any function with cpanel_uapi(service_id, module="Locale", function, params). Live availability depends on the cPanel features JetHost has enabled on your account — call list_cpanel_operations to see what is active.

get_attributes GET#

Return current locale settings

This function retrieves information about the user's current locale setting.

No parameters.

Response — normalized as { ok, data, errors[], warnings[] }; data contains:

directionstring
The locale's text direction. ltr - left to right. rtl - right to left.
One of: ltr rtl
encodingstring
The user's character set.
localestring
The locale's two-letter ISO-3166 code.
namestring
The locale's full name.

list_locales GET#

Return available locales

This function lists an account's available interface languages.

No parameters.

Response — normalized as { ok, data, errors[], warnings[] }; data is an array of:

directionstring
The locale's text direction. ltr - Left to right. rtl - Right to left.
One of: ltr rtl
local_namestring
The locale's full name, in the locale's language.
localestring
The locale's two-letter ISO-3166 code.
namestring
The locale's full name.

set_locale GET#

Update cPanel account locale

This function sets the account's locale.

localestringRequired
The locale's abbreviated name according to UAPI's Locale::list_locales function.

Response — normalized as { ok, data, errors[], warnings[] }; data contains:

Payload varies by call.