LOCALE_GET_PRIMARY_LANGUAGE(3) 1 LOCALE_GET_PRIMARY_LANGUAGE(3)Locale::getPrimaryLanguage - Gets the primary language for the input locale
Object oriented style
SYNOPSIS
publicstatic string Locale::getPrimaryLanguage (string $locale)
DESCRIPTION
Procedural style
string locale_get_primary_language (string $locale)
Gets the primary language for the input locale
PARAMETERS
o $locale
- The locale to extract the primary language code from
RETURN VALUES
The language code associated with the language or NULL in case of error.
EXAMPLES
Example #1
locale_get_primary_language(3) example
<?php
echo locale_get_primary_language('zh-Hant');
?>
Example #2
OO example
<?php
echo Locale::getPrimaryLanguage('zh-Hant');
?>
The above example will output:
zh
SEE ALSO locale_get_script(3), locale_get_region(3), locale_get_all_variants(3).
PHP Documentation Group LOCALE_GET_PRIMARY_LANGUAGE(3)
Check Out this Related Man Page
LOCALE_GET_DISPLAY_NAME(3) 1 LOCALE_GET_DISPLAY_NAME(3)Locale::getDisplayName - Returns an appropriately localized display name for the input locale
Object oriented style
SYNOPSIS
publicstatic string Locale::getDisplayName (string $locale, [string $in_locale])
DESCRIPTION
Procedural style
string locale_get_display_name (string $locale, [string $in_locale])
Returns an appropriately localized display name for the input locale. If is NULL then the default locale is used.
PARAMETERS
o $locale
- The locale to return a display name for.
o $in_locale
-optional format locale
RETURN VALUES
Display name of the locale in the format appropriate for $in_locale.
EXAMPLES
Example #1
locale_get_display_name(3) example
<?php
echo locale_get_display_name('sl-Latn-IT-nedis', 'en');
echo ";
";
echo locale_get_display_name('sl-Latn-IT-nedis', 'fr');
echo ";
";
echo locale_get_display_name('sl-Latn-IT-nedis', 'de');
?>
Example #2
OO example
<?php
echo Locale::getDisplayName('sl-Latn-IT-nedis', 'en');
echo ";
";
echo Locale::getDisplayName('sl-Latn-IT-nedis', 'fr');
echo ";
";
echo Locale::getDisplayName('sl-Latn-IT-nedis', 'de');
?>
The above example will output:
Slovenian (Latin, Italy, Natisone dialect);
slovxc3xa8ne (latin, Italie, dialecte de Natisone;
Slowenisch (Lateinisch, Italien, NEDIS)
SEE ALSO locale_get_display_language(3), locale_get_display_script(3), locale_get_display_region(3), locale_get_display_variant(3).
PHP Documentation Group LOCALE_GET_DISPLAY_NAME(3)
Hello all,
I was wondering if anyone knows how to install additional language after the system had been installed in english. I know that you could do an upgrade with the language support. But is there a way in which one can install different language fonts? I was reading up on Solaris install... (2 Replies)
hi
I have a shell script say primary.sh . There is a file called params
my scenario is
primary.sh should read all the values and echo it
for example
i should pass like
$primary.sh params
output would be
Abc
... (2 Replies)
What is extent of influence of C language? How essential is it in today's computer and IT technology? Do you think that the inventor of C language deserves more recognition than he appreciates now? (1 Reply)
For some reason when I do a date command I get response in another language:
maandag 15 augustus 2011 15.13 u. EDT
/etc/default/init file has this:
TZ=US/Eastern
CMASK=022
How do I change locale to English?
This is Solaris 10 x86 (3 Replies)
now I have a string
.a/b/c/done
I want to get "done" from it. That is the result should be "done"
sorry for my language before.
Thanks in advance (5 Replies)