Use PHP functions in JavaScript

JavaScript i18n_loc_get_default

!No description available for i18n_loc_get_default. @php.js developers: Please update the function summary text file.

1
2
3
4
56
7
8
9
1011
12
13
14
1516
17
function i18n_loc_get_default () {
    // !No description available for i18n_loc_get_default. @php.js developers: Please update the function summary text file.
    // 
    // version: 1109.2015
    // discuss at: http://phpjs.org/functions/i18n_loc_get_default    // +   original by: Brett Zamir (http://brett-zamir.me)
    // %          note 1: Renamed in PHP6 from locale_get_default(). Not listed yet at php.net
    // %          note 2: List of locales at http://demo.icu-project.org/icu-bin/locexp
    // %          note 3: To be usable with sort() if it is passed the SORT_LOCALE_STRING sorting flag: http://php.net/manual/en/function.sort.php
    // -    depends on: i18n_loc_set_default    // *     example 1: i18n_loc_get_default();
    // *     returns 1: 'en_US_POSIX'
    // BEGIN REDUNDANT
    this.php_js = this.php_js || {};
    // END REDUNDANT    return this.php_js.i18nLocale || (i18n_loc_set_default('en_US_POSIX'), 'en_US_POSIX'); // Ensure defaults are set up
}
external links: original PHP docs | raw js source

Examples

Running

1
i18n_loc_get_default();

Should return

1
'en_US_POSIX'

Dependencies

In order to use this function, you also need:

Open syntax issues

php.js uses JsLint to help us keep our code consistent and prevent some common bugs.

Eventually we want all code to pass or at least take into consideration most fixes suggested by JsLint, following this JsLint configuration we’ve decided on.


Authors

Thanks to the following developers, you get to have i18n_loc_get_default goodness in JavaScript.

Comments

Add Comment
Use:
[CODE]
your_stuff('here');
[/CODE]
for proper code formatting
By submitting code here you are allowing us to use it in php.js hence dual licensing it under the MIT and GPL licenses

No comments yet. Be the first!


Contribute a New function

More functions

In this category

» i18n_loc_get_default
i18n_loc_set_default

Support us

spread the word:


Use any PHP function in JavaScript


These kind folks have already donated: AYHAN BARI*, Nikita Ekshiyan, Nikita Ekshiyan, Petr Pavel, @HalfWinter, Paulo Freitas, Andros Peña Romo, @andorosu, Raimund Szabo, Nitin Gupta, @nikosdion, Anonymous, Anonymous and Shawn Houser.
<your name here>

Click here to lend your support to: phpjs and make a donation at www.pledgie.com !