Page tree
Skip to end of metadata
Go to start of metadata

 

Description

This function lists your server's available languages.

Examples 


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/getlanglist
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/getlanglist
 Command Line
whmapi0 getlanglist

Notes:

  • You must URI-encode values.
  • For more information and additional output options, read our Guide to WHM API 0 documentation or run the whmapi0 --help command. 
  • We introduced this functionality in cPanel & WHM version 11.52.0.8.

 Output (JSON)
{  
   "lang":[  
      "arabic",
      "brazilian-portuguese-utf8",
      "chinese",
      "dutch-utf8",
      "english",
      "english-utf8",
      "french",
      "french-utf8",
      "german",
      "german-utf8",
      "iberian_spanish",
      "japanese",
      "portuguese",
      "portuguese-utf8",
      "russian",
      "spanish",
      "spanish-utf8",
      "spanish_latinamerica"
   ],
   "themes":{  
      "paper_lantern":{  
         "french-utf8":1,
         "english-utf8":1,
         "japanese":1,
         "german":1,
         "german-utf8":1,
         "chinese":1,
         "french":1,
         "portuguese-utf8":1,
         "spanish-utf8":1,
         "russian":1,
         "english":1,
         "spanish":1,
         "dutch-utf8":1,
         "arabic":1,
         "iberian_spanish":1,
         "brazilian-portuguese-utf8":1,
         "portuguese":1
      },
      "/":{  
         "portuguese":1,
         "brazilian-portuguese-utf8":1,
         "spanish_latinamerica":1,
         "dutch-utf8":1,
         "arabic":1,
         "iberian_spanish":1,
         "english":1,
         "spanish":1,
         "spanish-utf8":1,
         "russian":1,
         "german-utf8":1,
         "chinese":1,
         "french":1,
         "portuguese-utf8":1,
         "german":1,
         "french-utf8":1,
         "english-utf8":1,
         "japanese":1
      }
   }
}
 Output (XML)
<getlanglist>
    <lang>arabic</lang>
    <lang>brazilian-portuguese-utf8</lang>
    <lang>chinese</lang>
    <lang>dutch-utf8</lang>
    <lang>english</lang>
    <lang>english-utf8</lang>
    <lang>french</lang>
    <lang>french-utf8</lang>
    <lang>german</lang>
    <lang>german-utf8</lang>
    <lang>iberian_spanish</lang>
    <lang>japanese</lang>
    <lang>portuguese</lang>
    <lang>portuguese-utf8</lang>
    <lang>russian</lang>
    <lang>spanish</lang>
    <lang>spanish-utf8</lang>
    <lang>spanish_latinamerica</lang>
    <themes>
        <name>/</name>
        <arabic>1</arabic>
        <brazilian-portuguese-utf8>1</brazilian-portuguese-utf8>
        <chinese>1</chinese>
        <dutch-utf8>1</dutch-utf8>
        <english>1</english>
        <english-utf8>1</english-utf8>
        <french>1</french>
        <french-utf8>1</french-utf8>
        <german>1</german>
        <german-utf8>1</german-utf8>
        <iberian_spanish>1</iberian_spanish>
        <japanese>1</japanese>
        <portuguese>1</portuguese>
        <portuguese-utf8>1</portuguese-utf8>
        <russian>1</russian>
        <spanish>1</spanish>
        <spanish-utf8>1</spanish-utf8>
        <spanish_latinamerica>1</spanish_latinamerica>
    </themes>
    <themes>
        <name>paper_lantern</name>
        <arabic>1</arabic>
        <brazilian-portuguese-utf8>1</brazilian-portuguese-utf8>
        <chinese>1</chinese>
        <dutch-utf8>1</dutch-utf8>
        <english>1</english>
        <english-utf8>1</english-utf8>
        <french>1</french>
        <french-utf8>1</french-utf8>
        <german>1</german>
        <german-utf8>1</german-utf8>
        <iberian_spanish>1</iberian_spanish>
        <japanese>1</japanese>
        <portuguese>1</portuguese>
        <portuguese-utf8>1</portuguese-utf8>
        <russian>1</russian>
        <spanish>1</spanish>
        <spanish-utf8>1</spanish-utf8>
    </themes>
</getlanglist>

   

Parameters

This function does not accept parameters. 

Returns

ReturnTypeDescriptionPossible valuesExample
getlanglisthash

A hash of the server's languages.

This hash includes the lang array and the themes hash. 

lang

array

A list of available languages.

The function returns this array in the getlanglist hash.

A valid language name.english

themes

hash

A hash of the server's themes.

The function returns this hash in the getlanglist hash.

This hash includes the theme name hash. 

theme name

hash

A theme's name (paper_lantern or the name of another theme on the server).

Note:

The theme's name is the parameter name.

The function returns this hash in the themes hash.

This hash includes the charset name return.

 

charset name

Boolean

Whether the theme possesses a character set.

Note:

The character set's name is the parameter name.

The function returns this value in the name hash.

  • 1 — Available.
 1