Results 1 to 4 of 4

Thread: API call request

  1. #1
    Member
    Join Date
    Aug 2011
    Posts
    15
    cPanel/WHM Access Level

    Root Administrator

    Default API call request

    I searched through the api wiki and open a support ticket but it's looks like there is no such api call to get the language prefix (eg. en for English) in the user interface template system.

    In the end we overcome the problem but an api call will be very usefull for plugins that want to offer multilingual support.
    Last edited by Gili-H; 11-20-2011 at 09:07 AM.
    Host4site.co.il | Web hosting providers in Israel
    GK-root.com developer

  2. #2
    cPanel Staff
    Join Date
    Mar 2004
    Posts
    710

    Default Re: API call request

    Hello,

    Sorry for the delay, I looked this over and found that not all locale related api2 calls are documented.

    I've created an internal case (55683) to update ApiLocale < ApiDocs/Api2 < TWiki accordingly.

    in the meantime this is what is available via api2:

    • Locale::get_user_locale
    • Takes no parameters
    • Returns the user’s locale’s identifier tag. (e.g. en, en_us, fr, …)

    • Locale::get_user_locale_name
    • Takes no parameters
    • Returns the user’s locale’s name in the locale’s language. (e.g. English, français, etc)

    • Locale::get_locale_name
    • Takes an optional parameter of the locale whose information you want. If not given it uses the user’s locale.
    • Returns the locale’s name in the user’s locale’s language. (e.g. English, français, etc)

    • Locale::get_encoding
    • Takes no parameters
    • Returns the user’s locale’s character set encoding, typically “utf-8”.

    • Locale::get_html_dir_attr
    • Takes no parameters
    • Returns the user’s locale’s directionality as a string suitable for the <html> tag’s dir attribute.

  3. #3
    Registered User
    Join Date
    Sep 2008
    Location
    Houston, Tx
    Posts
    1

    Default Re: API call request

    The documentation for these API calls is no available here: ApiLocale < ApiDocs/Api2 < TWiki

  4. #4
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,307
    cPanel/WHM Access Level

    Root Administrator

    Default Re: API call request

    Quote Originally Posted by cPJustinS View Post
    The documentation for these API calls is no available here: ApiLocale < ApiDocs/Api2 < TWiki
    I am currently unable to replicate this issue, loads for me. I know yesterday the docs site was being weird for a few hours, try again today.

Similar Threads

  1. API Call Safe?
    By hostb in forum cPanel Developers
    Replies: 9
    Last Post: 09-26-2011, 12:07 PM
  2. API call from within CustomEventHandler
    By tizoo in forum cPanel Developers
    Replies: 2
    Last Post: 06-02-2011, 10:59 AM
  3. API Request: List all records in a zone with 1 call
    By micho101 in forum Feature Requests for cPanel & WHM
    Replies: 2
    Last Post: 09-01-2010, 01:35 PM
  4. Looking up cPanel API call parameters
    By MattDees in forum cPanel Developers
    Replies: 2
    Last Post: 04-05-2010, 01:21 AM
  5. API Call to see Mail Queue
    By KMyers in forum cPanel Developers
    Replies: 1
    Last Post: 11-11-2009, 09:29 AM