13 if (defined(
'\JSON_UNESCAPED_SLASHES')) {
14 $result |= \JSON_UNESCAPED_SLASHES;
16 if (defined(
'\JSON_UNESCAPED_UNICODE')) {
17 $result |= \JSON_UNESCAPED_UNICODE;
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());
61 return 'Build a compressed JSON-encoded file';
Base class for all the exporters.
if(isset($_REQUEST['delete'])) $list
static getEncodeOptions()
Return the options for json_encode.
static toStringDo($languages)