読者です 読者をやめる 読者になる 読者になる

tohokuaikiのチラシの裏

技術的ネタとか。

Confluenceのプラグイン開発を承ります。ご連絡はこちらのホームページからお願いいたします。

ロケールの一覧をPHPの配列とJSONで

ここの「推奨」の方だけ
http://docs.oracle.com/cd/E26924_01/html/E27144/glset.html

<?php
array (
  'af' => 
  array (
    'name' => 'アフリカーンス語',
    'loc' => 
    array (
      'ZA' => '南アフリカ',
    ),
  ),
  'ar' => 
  array (
    'name' => 'アラビア語',
    'loc' => 
    array (
      'AE' => 'アラブ首長国連邦',
      'BH' => 'バーレーン',
      'DZ' => 'アルジェリア',
      'EG' => 'エジプト',
      'IQ' => 'イラク',
      'JO' => 'ヨルダン',
      'KW' => 'クウェート',
      'LY' => 'リビア',
      'MA' => 'モロッコ',
      'OM' => 'オマーン',
      'QA' => 'カタール',
      'SA' => 'サウジアラビア',
      'TN' => 'チュニジア',
      'YE' => 'イエメン',
    ),
  ),
  'as' => 
  array (
    'name' => 'アッサム語',
    'loc' => 
    array (
      'IN' => 'インド',
    ),
  ),
  'az' => 
  array (
    'name' => 'アゼルバイジャン語',
    'loc' => 
    array (
      'AZ' => 'アゼルバイジャン',
    ),
  ),
  'be' => 
  array (
    'name' => 'ベラルーシ語',
    'loc' => 
    array (
      'BY' => 'ベラルーシ',
    ),
  ),
  'bg' => 
  array (
    'name' => 'ブルガリア語',
    'loc' => 
    array (
      'BG' => 'ブルガリア',
    ),
  ),
  'bn' => 
  array (
    'name' => 'ベンガル語',
    'loc' => 
    array (
      'IN' => 'インド',
    ),
  ),
  'bs' => 
  array (
    'name' => 'ボスニア語',
    'loc' => 
    array (
      'BA' => 'ボスニア・ヘルツェゴビナ',
    ),
  ),
  'ca' => 
  array (
    'name' => 'カタロニア語',
    'loc' => 
    array (
      'ES' => 'スペイン',
    ),
  ),
  'cs' => 
  array (
    'name' => 'チェコ語',
    'loc' => 
    array (
      'CZ' => 'チェコ共和国',
    ),
  ),
  'da' => 
  array (
    'name' => 'デンマーク語',
    'loc' => 
    array (
      'DK' => 'デンマーク',
    ),
  ),
  'de' => 
  array (
    'name' => 'ドイツ',
    'loc' => 
    array (
      'AT' => 'オーストリア',
      'BE' => 'ベルギー',
      'CH' => 'スイス',
      'DE' => 'ドイツ',
      'LI' => 'リヒテンシュタイン',
      'LU' => 'ルクセンブルグ',
    ),
  ),
  'el' => 
  array (
    'name' => 'ギリシャ語',
    'loc' => 
    array (
      'CY' => 'キプロス',
      'GR' => 'ギリシャ',
    ),
  ),
  'en' => 
  array (
    'name' => '英語',
    'loc' => 
    array (
      'AU' => 'オーストラリア',
      'BW' => 'ボツワナ',
      'CA' => 'カナダ',
      'GB' => '英国',
      'HK' => '香港 SAR 中国',
      'IE' => 'アイルランド',
      'IN' => 'インド',
      'MT' => 'マルタ',
      'NZ' => 'ニュージーランド',
      'PH' => 'フィリピン',
      'SG' => 'シンガポール',
      'US' => '米国',
      'ZW' => 'ジンバブエ',
    ),
  ),
  'es' => 
  array (
    'name' => 'スペイン語',
    'loc' => 
    array (
      'AR' => 'アルゼンチン',
      'BO' => 'ボリビア',
      'CL' => 'チリ',
      'CO' => 'コロンビア',
      'CR' => 'コスタリカ',
      'DO' => 'ドミニカ共和国',
      'EC' => 'エクアドル',
      'ES' => 'スペイン',
      'GT' => 'グアテマラ',
      'HN' => 'ホンジュラス',
      'MX' => 'メキシコ',
      'NI' => 'ニカラグア',
      'PA' => 'パナマ',
      'PE' => 'ペルー',
      'PR' => 'プエルトリコ',
      'PY' => 'パラグアイ',
      'SV' => 'エルサルバドル',
      'US' => '米国',
      'UY' => 'ウルグアイ',
      'VE' => 'ベネズエラ',
    ),
  ),
  'et' => 
  array (
    'name' => 'エストニア語',
    'loc' => 
    array (
      'EE' => 'エストニア',
    ),
  ),
  'fi' => 
  array (
    'name' => 'フィンランド語',
    'loc' => 
    array (
      'FI' => 'フィンランド',
    ),
  ),
  'fr' => 
  array (
    'name' => 'フランス語',
    'loc' => 
    array (
      'BE' => 'ベルギー',
      'CA' => 'カナダ',
      'CH' => 'スイス',
      'FR' => 'フランス',
      'LU' => 'ルクセンブルク',
    ),
  ),
  'gu' => 
  array (
    'name' => 'グジャラート語',
    'loc' => 
    array (
      'IN' => 'インド',
    ),
  ),
  'he' => 
  array (
    'name' => 'ヘブライ語',
    'loc' => 
    array (
      'IL' => 'イスラエル',
    ),
  ),
  'hi' => 
  array (
    'name' => 'ヒンズー語',
    'loc' => 
    array (
      'IN' => 'インド',
    ),
  ),
  'hr' => 
  array (
    'name' => 'クロアチア語',
    'loc' => 
    array (
      'HR' => 'クロアチア',
    ),
  ),
  'hu' => 
  array (
    'name' => 'ハンガリー語',
    'loc' => 
    array (
      'HU' => 'ハンガリー',
    ),
  ),
  'hy' => 
  array (
    'name' => 'アルメニア語',
    'loc' => 
    array (
      'AM' => 'アルメニア',
    ),
  ),
  'id' => 
  array (
    'name' => 'インドネシア語',
    'loc' => 
    array (
      'ID' => 'インドネシア',
    ),
  ),
  'is' => 
  array (
    'name' => 'アイスランド語',
    'loc' => 
    array (
      'IS' => 'アイスランド',
    ),
  ),
  'it' => 
  array (
    'name' => 'イタリア語',
    'loc' => 
    array (
      'CH' => 'スイス',
      'IT' => 'イタリア',
    ),
  ),
  'ja' => 
  array (
    'name' => '日本語',
    'loc' => 
    array (
      'JP' => '日本',
    ),
  ),
  'ka' => 
  array (
    'name' => 'グルジア語',
    'loc' => 
    array (
      'GE' => 'グルジア',
    ),
  ),
  'kk' => 
  array (
    'name' => 'カザフ語',
    'loc' => 
    array (
      'KZ' => 'カザフスタン',
    ),
  ),
  'kn' => 
  array (
    'name' => 'カナラ語',
    'loc' => 
    array (
      'IN' => 'インド',
    ),
  ),
  'ko' => 
  array (
    'name' => '韓国語',
    'loc' => 
    array (
      'KR' => '韓国',
    ),
  ),
  'ks' => 
  array (
    'name' => 'カシミール語',
    'loc' => 
    array (
      'IN' => 'インド',
    ),
  ),
  'ku' => 
  array (
    'name' => 'クルド語',
    'loc' => 
    array (
      'TR' => 'トルコ',
    ),
  ),
  'ky' => 
  array (
    'name' => 'キルギス語',
    'loc' => 
    array (
      'KG' => 'キルギスタン',
    ),
  ),
  'lt' => 
  array (
    'name' => 'リトアニア語',
    'loc' => 
    array (
      'LT' => 'リトアニア',
    ),
  ),
  'lv' => 
  array (
    'name' => 'ラトビア語',
    'loc' => 
    array (
      'LV' => 'ラトビア',
    ),
  ),
  'mk' => 
  array (
    'name' => 'マケドニア語',
    'loc' => 
    array (
      'MK' => 'マケドニア',
    ),
  ),
  'ml' => 
  array (
    'name' => 'マラヤーラム語',
    'loc' => 
    array (
      'IN' => 'インド',
    ),
  ),
  'mr' => 
  array (
    'name' => 'マラーティー語',
    'loc' => 
    array (
      'IN' => 'インド',
    ),
  ),
  'ms' => 
  array (
    'name' => 'マレー語',
    'loc' => 
    array (
      'MY' => 'マレーシア',
    ),
  ),
  'mt' => 
  array (
    'name' => 'マルタ語',
    'loc' => 
    array (
      'MT' => 'マルタ',
    ),
  ),
  'nb' => 
  array (
    'name' => 'ブークモール',
    'loc' => 
    array (
      'NO' => 'ノルウェー',
    ),
  ),
  'nl' => 
  array (
    'name' => 'オランダ語',
    'loc' => 
    array (
      'BE' => 'ベルギー',
      'NL' => 'オランダ',
    ),
  ),
  'nn' => 
  array (
    'name' => 'ニーノシュク',
    'loc' => 
    array (
      'NO' => 'ノルウェー',
    ),
  ),
  'or' => 
  array (
    'name' => 'オリヤー語',
    'loc' => 
    array (
      'IN' => 'インド',
    ),
  ),
  'pa' => 
  array (
    'name' => 'パンジャブ語',
    'loc' => 
    array (
      'IN' => 'インド',
    ),
  ),
  'pl' => 
  array (
    'name' => 'ポーランド語',
    'loc' => 
    array (
      'PL' => 'ポーランド',
    ),
  ),
  'pt' => 
  array (
    'name' => 'ポルトガル語',
    'loc' => 
    array (
      'BR' => 'ブラジル',
      'PT' => 'ポルトガル',
    ),
  ),
  'ro' => 
  array (
    'name' => 'ルーマニア語',
    'loc' => 
    array (
      'RO' => 'ルーマニア',
    ),
  ),
  'ru' => 
  array (
    'name' => 'ロシア語',
    'loc' => 
    array (
      'RU' => 'ロシア',
      'UA' => 'ウクライナ',
    ),
  ),
  'sa' => 
  array (
    'name' => 'サンスクリット語',
    'loc' => 
    array (
      'IN' => 'インド',
    ),
  ),
  'sk' => 
  array (
    'name' => 'スロバキア語',
    'loc' => 
    array (
      'SK' => 'スロバキア',
    ),
  ),
  'sl' => 
  array (
    'name' => 'スロベニア語',
    'loc' => 
    array (
      'SI' => 'スロベニア',
    ),
  ),
  'sq' => 
  array (
    'name' => 'アルバニア語',
    'loc' => 
    array (
      'AL' => 'アルバニア',
    ),
  ),
  'sr' => 
  array (
    'name' => 'セルビア語',
    'loc' => 
    array (
      'ME' => 'モンテネグロ (ラテン文字)',
      'RS' => 'セルビア (ラテン文字)',
    ),
  ),
  'sv' => 
  array (
    'name' => 'スウェーデン語',
    'loc' => 
    array (
      'SE' => 'スウェーデン',
    ),
  ),
  'ta' => 
  array (
    'name' => 'タミル語',
    'loc' => 
    array (
      'IN' => 'インド',
    ),
  ),
  'te' => 
  array (
    'name' => 'テルグ語',
    'loc' => 
    array (
      'IN' => 'インド',
    ),
  ),
  'th' => 
  array (
    'name' => 'タイ語',
    'loc' => 
    array (
      'TH' => 'タイ',
    ),
  ),
  'tr' => 
  array (
    'name' => 'トルコ語',
    'loc' => 
    array (
      'TR' => 'トルコ',
    ),
  ),
  'uk' => 
  array (
    'name' => 'ウクライナ語',
    'loc' => 
    array (
      'UA' => 'ウクライナ',
    ),
  ),
  'vi' => 
  array (
    'name' => 'ベトナム語',
    'loc' => 
    array (
      'VN' => 'ベトナム',
    ),
  ),
  'zh' => 
  array (
    'name' => '簡体字中国語',
    'loc' => 
    array (
      'CN' => '中国',
      'HK' => '香港 SAR 中国',
      'SG' => 'シンガポール',
      'TW' => '台湾',
    ),
  ),
)

ついでにJSON

{"af":{"name":"\u30a2\u30d5\u30ea\u30ab\u30fc\u30f3\u30b9\u8a9e","loc":{"ZA":null}},"ar":{"name":"\u30a2\u30e9\u30d3\u30a2\u8a9e","loc":{"AE":null,"BH":null,"DZ":null,"EG":null,"IQ":null,"JO":null,"KW":null,"LY":null,"MA":null,"OM":null,"QA":null,"SA":null,"TN":null,"YE":null}},"as":{"name":"\u30a2\u30c3\u30b5\u30e0\u8a9e","loc":{"IN":null}},"az":{"name":"\u30a2\u30bc\u30eb\u30d0\u30a4\u30b8\u30e3\u30f3\u8a9e","loc":{"AZ":null}},"be":{"name":"\u30d9\u30e9\u30eb\u30fc\u30b7\u8a9e","loc":{"BY":null}},"bg":{"name":"\u30d6\u30eb\u30ac\u30ea\u30a2\u8a9e","loc":{"BG":null}},"bn":{"name":"\u30d9\u30f3\u30ac\u30eb\u8a9e","loc":{"IN":null}},"bs":{"name":"\u30dc\u30b9\u30cb\u30a2\u8a9e","loc":{"BA":null}},"ca":{"name":"\u30ab\u30bf\u30ed\u30cb\u30a2\u8a9e","loc":{"ES":null}},"cs":{"name":"\u30c1\u30a7\u30b3\u8a9e","loc":{"CZ":null}},"da":{"name":"\u30c7\u30f3\u30de\u30fc\u30af\u8a9e","loc":{"DK":null}},"de":{"name":"\u30c9\u30a4\u30c4","loc":{"AT":null,"BE":null,"CH":null,"DE":null,"LI":null,"LU":null}},"el":{"name":"\u30ae\u30ea\u30b7\u30e3\u8a9e","loc":{"CY":null,"GR":null}},"en":{"name":"\u82f1\u8a9e","loc":{"AU":null,"BW":null,"CA":null,"GB":null,"HK":null,"IE":null,"IN":null,"MT":null,"NZ":null,"PH":null,"SG":null,"US":null,"ZW":null}},"es":{"name":"\u30b9\u30da\u30a4\u30f3\u8a9e","loc":{"AR":null,"BO":null,"CL":null,"CO":null,"CR":null,"DO":null,"EC":null,"ES":null,"GT":null,"HN":null,"MX":null,"NI":null,"PA":null,"PE":null,"PR":null,"PY":null,"SV":null,"US":null,"UY":null,"VE":null}},"et":{"name":"\u30a8\u30b9\u30c8\u30cb\u30a2\u8a9e","loc":{"EE":null}},"fi":{"name":"\u30d5\u30a3\u30f3\u30e9\u30f3\u30c9\u8a9e","loc":{"FI":null}},"fr":{"name":"\u30d5\u30e9\u30f3\u30b9\u8a9e","loc":{"BE":null,"CA":null,"CH":null,"FR":null,"LU":null}},"gu":{"name":"\u30b0\u30b8\u30e3\u30e9\u30fc\u30c8\u8a9e","loc":{"IN":null}},"he":{"name":"\u30d8\u30d6\u30e9\u30a4\u8a9e","loc":{"IL":null}},"hi":{"name":"\u30d2\u30f3\u30ba\u30fc\u8a9e","loc":{"IN":null}},"hr":{"name":"\u30af\u30ed\u30a2\u30c1\u30a2\u8a9e","loc":{"HR":null}},"hu":{"name":"\u30cf\u30f3\u30ac\u30ea\u30fc\u8a9e","loc":{"HU":null}},"hy":{"name":"\u30a2\u30eb\u30e1\u30cb\u30a2\u8a9e","loc":{"AM":null}},"id":{"name":"\u30a4\u30f3\u30c9\u30cd\u30b7\u30a2\u8a9e","loc":{"ID":null}},"is":{"name":"\u30a2\u30a4\u30b9\u30e9\u30f3\u30c9\u8a9e","loc":{"IS":null}},"it":{"name":"\u30a4\u30bf\u30ea\u30a2\u8a9e","loc":{"CH":null,"IT":null}},"ja":{"name":"\u65e5\u672c\u8a9e","loc":{"JP":null}},"ka":{"name":"\u30b0\u30eb\u30b8\u30a2\u8a9e","loc":{"GE":null}},"kk":{"name":"\u30ab\u30b6\u30d5\u8a9e","loc":{"KZ":null}},"kn":{"name":"\u30ab\u30ca\u30e9\u8a9e","loc":{"IN":null}},"ko":{"name":"\u97d3\u56fd\u8a9e","loc":{"KR":null}},"ks":{"name":"\u30ab\u30b7\u30df\u30fc\u30eb\u8a9e","loc":{"IN":null}},"ku":{"name":"\u30af\u30eb\u30c9\u8a9e","loc":{"TR":null}},"ky":{"name":"\u30ad\u30eb\u30ae\u30b9\u8a9e","loc":{"KG":null}},"lt":{"name":"\u30ea\u30c8\u30a2\u30cb\u30a2\u8a9e","loc":{"LT":null}},"lv":{"name":"\u30e9\u30c8\u30d3\u30a2\u8a9e","loc":{"LV":null}},"mk":{"name":"\u30de\u30b1\u30c9\u30cb\u30a2\u8a9e","loc":{"MK":null}},"ml":{"name":"\u30de\u30e9\u30e4\u30fc\u30e9\u30e0\u8a9e","loc":{"IN":null}},"mr":{"name":"\u30de\u30e9\u30fc\u30c6\u30a3\u30fc\u8a9e","loc":{"IN":null}},"ms":{"name":"\u30de\u30ec\u30fc\u8a9e","loc":{"MY":null}},"mt":{"name":"\u30de\u30eb\u30bf\u8a9e","loc":{"MT":null}},"nb":{"name":"\u30d6\u30fc\u30af\u30e2\u30fc\u30eb","loc":{"NO":null}},"nl":{"name":"\u30aa\u30e9\u30f3\u30c0\u8a9e","loc":{"BE":null,"NL":null}},"nn":{"name":"\u30cb\u30fc\u30ce\u30b7\u30e5\u30af","loc":{"NO":null}},"or":{"name":"\u30aa\u30ea\u30e4\u30fc\u8a9e","loc":{"IN":null}},"pa":{"name":"\u30d1\u30f3\u30b8\u30e3\u30d6\u8a9e","loc":{"IN":null}},"pl":{"name":"\u30dd\u30fc\u30e9\u30f3\u30c9\u8a9e","loc":{"PL":null}},"pt":{"name":"\u30dd\u30eb\u30c8\u30ac\u30eb\u8a9e","loc":{"BR":null,"PT":null}},"ro":{"name":"\u30eb\u30fc\u30de\u30cb\u30a2\u8a9e","loc":{"RO":null}},"ru":{"name":"\u30ed\u30b7\u30a2\u8a9e","loc":{"RU":null,"UA":null}},"sa":{"name":"\u30b5\u30f3\u30b9\u30af\u30ea\u30c3\u30c8\u8a9e","loc":{"IN":null}},"sk":{"name":"\u30b9\u30ed\u30d0\u30ad\u30a2\u8a9e","loc":{"SK":null}},"sl":{"name":"\u30b9\u30ed\u30d9\u30cb\u30a2\u8a9e","loc":{"SI":null}},"sq":{"name":"\u30a2\u30eb\u30d0\u30cb\u30a2\u8a9e","loc":{"AL":null}},"sr":{"name":"\u30bb\u30eb\u30d3\u30a2\u8a9e","loc":{"ME":null,"RS":null}},"sv":{"name":"\u30b9\u30a6\u30a7\u30fc\u30c7\u30f3\u8a9e","loc":{"SE":null}},"ta":{"name":"\u30bf\u30df\u30eb\u8a9e","loc":{"IN":null}},"te":{"name":"\u30c6\u30eb\u30b0\u8a9e","loc":{"IN":null}},"th":{"name":"\u30bf\u30a4\u8a9e","loc":{"TH":null}},"tr":{"name":"\u30c8\u30eb\u30b3\u8a9e","loc":{"TR":null}},"uk":{"name":"\u30a6\u30af\u30e9\u30a4\u30ca\u8a9e","loc":{"UA":null}},"vi":{"name":"\u30d9\u30c8\u30ca\u30e0\u8a9e","loc":{"VN":null}},"zh":{"name":"\u7c21\u4f53\u5b57\u4e2d\u56fd\u8a9e","loc":{"CN":null,"HK":null,"SG":null,"TW":null}}}