Добро пожаловать на форум PHP программистов!
За последние 24 часа нас посетили 20237 программистов и 1095 роботов. Сейчас ищет 331 программист ...
Приступая к работе

MessageFormatter::getLocale - Get the locale for which the formatter was created.

Вернуться к: MessageFormatter

MessageFormatter::getLocale

msgfmt_get_locale

(PHP 5 >= 5.3.0, PHP 7, PECL intl >= 1.0.0)

MessageFormatter::getLocale -- msgfmt_get_localeGet the locale for which the formatter was created.

Описание

Объектно-ориентированный стиль

public string MessageFormatter::getLocale ( void )

Процедурный стиль

string msgfmt_get_locale ( NumberFormatter $formatter )

Get the locale for which the formatter was created.

Список параметров

formatter

The formatter resource

Возвращаемые значения

The locale name

Примеры

Пример #1 msgfmt_get_locale() example

<?php
$fmt 
msgfmt_create('en_US'"Number {0,number}");
echo 
msgfmt_get_locale($fmt);
?>

Пример #2 OO example

<?php
$fmt 
= new MessageFormatter('en_US'"Number {0,number}");
echo 
$fmt->getLocale();
?>

Результат выполнения данного примера:

en_US

Смотрите также



Вернуться к: MessageFormatter

© 2024 «PHP.RU — Сообщество PHP-Программистов»
Главная | Форум | Реклама на сайте | Контакты VIP Сувениры
Разработка компании ODware