からロケールを取得する簡単な方法はありますtimezone_identifier
か?
例えば:
date_default_timezone_set('Europe/Berlin');
その場合のロケールはde_DE
.
言ったように、これdeceze
の可能性はありません。ただし、タイムゾーンから位置情報を取得できます。php.netが言うように
$tz = new DateTimeZone("Europe/Prague");
print_r($tz->getLocation());
print_r(timezone_location_get($tz));
出力します
Array
(
[country_code] => CZ
[latitude] => 50.08333
[longitude] => 14.43333
[comments] =>
)
Array
(
[country_code] => CZ
[latitude] => 50.08333
[longitude] => 14.43333
[comments] =>
)
いいえ、そのような 1 対 1 の相関関係がないためです。ベルギーを例にとると、公式には同じタイムゾーンで 3 つの言語を話します。