Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

locale_get_primary_language(3) [php man page]

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)
Man Page

7 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

install locale on Solaris8

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)
Discussion started by: larry
2 Replies

2. UNIX Desktop Questions & Answers

unix language

(0 Replies)
Discussion started by: james_jammy
0 Replies

3. Programming

I am a newb to the C programmming language how do I make it interesting?

I am a newb to the C programmming language how do I make it interesting? (6 Replies)
Discussion started by: yunusabd786
6 Replies

4. UNIX for Dummies Questions & Answers

Reading from a file(passing the file as input parameter)

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)
Discussion started by: ssuresh1999
2 Replies

5. What is on Your Mind?

How would you analyze the impact of C language on computer technology?

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)
Discussion started by: Anna Hussie
1 Replies

6. UNIX for Dummies Questions & Answers

Solaris Date in different language

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)
Discussion started by: bratan
3 Replies

7. Shell Programming and Scripting

how to cut a string from a string

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)
Discussion started by: Henryyy
5 Replies