Definition at line 4 of file Json.php.
◆ getDescription()
static Gettext\Languages\Exporter\Json::getDescription |
( |
| ) |
|
|
static |
◆ getEncodeOptions()
static Gettext\Languages\Exporter\Json::getEncodeOptions |
( |
| ) |
|
|
staticprotected |
Return the options for json_encode.
- Returns
- int
Definition at line 10 of file Json.php.
References $result, and defined.
13 if (
defined(
'\JSON_UNESCAPED_SLASHES')) {
14 $result |= \JSON_UNESCAPED_SLASHES;
16 if (
defined(
'\JSON_UNESCAPED_UNICODE')) {
17 $result |= \JSON_UNESCAPED_UNICODE;
defined( 'APPLICATION_ENV')||define( 'APPLICATION_ENV'
◆ toStringDo()
static Gettext\Languages\Exporter\Json::toStringDo |
( |
|
$languages | ) |
|
|
staticprotected |
- See also
- Exporter::toStringDo
Definition at line 25 of file Json.php.
References $list, and array.
28 foreach ($languages as $language) {
30 $item[
'name'] = $language->name;
31 if (isset($language->supersededBy)) {
32 $item[
'supersededBy'] = $language->supersededBy;
34 if (isset($language->script)) {
35 $item[
'script'] = $language->script;
37 if (isset($language->territory)) {
38 $item[
'territory'] = $language->territory;
40 if (isset($language->baseLanguage)) {
41 $item[
'baseLanguage'] = $language->baseLanguage;
43 $item[
'formula'] = $language->formula;
44 $item[
'plurals'] = count($language->categories);
45 $item[
'cases'] =
array();
46 $item[
'examples'] =
array();
47 foreach ($language->categories as $category) {
48 $item[
'cases'][] = $category->id;
49 $item[
'examples'][$category->id] = $category->examples;
51 $list[$language->id] = $item;
54 return json_encode(
$list, static::getEncodeOptions());
if(isset($_REQUEST['delete'])) $list
Create styles array
The data for the language used.
The documentation for this class was generated from the following file:
- libs/composer/vendor/gettext/languages/src/Exporter/Json.php