Export (0) Print
Expand All

CultureInfo.GetConsoleFallbackUICulture Method

Gets an alternate user interface culture suitable for console applications when the default graphic user interface culture is unsuitable.

Namespace:  System.Globalization
Assembly:  mscorlib (in mscorlib.dll)

[<ComVisibleAttribute(false)>]
member GetConsoleFallbackUICulture : unit -> CultureInfo

Return Value

Type: System.Globalization.CultureInfo
An alternate culture that is used to read and display text on the console.

Languages such as Arabic, Hebrew, Urdu, and Syriac are based on bidirectional text. Windows applications, which have a graphical user interface, support bidirectional languages. However, console applications, which employ the text user interface of the operating system console, do not provide bidirectional support. Therefore, if you localize a console application to Arabic or Hebrew, your application displays unreadable text on the console screen.

The user interface culture specifies the resources an application needs to support user input and output, and by default is the same as the operating system culture. For example, the CultureInfo.CurrentUICulture property returns an Arabic culture for an Arabic operating system. Use the GetConsoleFallbackUICulture method to retrieve a culture suitable for a console application user interface. After your application retrieves the fallback user interface culture, it should assign the culture to the current user interface culture of the current thread. For more information, see the "Explicitly Setting the Current UI Culture" section of the CurrentUICulture property.

The following are predefined cultures that have a different fallback user interface culture name from the predefined culture name.

Predefined culture

Culture name

Fallback user interface culture name

Amharic

am

en-US

Amharic (Ethiopia)

am-ET

en-US

(neutral Arabic)

ar

en-US

Arabic (U.A.E.)

ar-AE

en-US

Arabic (Bahrain)

ar-BH

en-US

Arabic (Algeria)

ar-DZ

fr-FR

Arabic (Egypt)

ar-EG

en-US

Arabic (Iraq)

ar-IQ

en-US

Arabic (Jordan)

ar-JO

en-US

Arabic (Kuwait)

ar-KW

en-US

Arabic (Lebanon)

ar-LB

en-US

Arabic (Libya)

ar-LY

en-US

Arabic (Morocco)

ar-MA

fr-FR

Arabic (Oman)

ar-OM

en-US

Arabic (Qatar)

ar-QA

en-US

Arabic (Saudi Arabia)

ar-SA

en-US

Arabic (Syria)

ar-SY

en-US

Arabic (Tunisia)

ar-TN

fr-FR

Arabic (Yemen)

ar-YE

en-US

Assamese

as

en-US

Assamese (India)

as-IN

en-US

Bengali

bn

en-US

Bengali (Bangladesh)

bn-BD

en-US

Bengali (India)

bn-IN

en-US

Tibetan

bo

en-US

Tibetan (PRC)

bo-CN

en-US

Divehi

dv

en-US

Divehi (India)

dv-MV

en-US

Persian

fa

en-US

Persian (Iran)

fa-IR

en-US

Gujarati

gu

en-US

Gujarati (India)

gu-IN

en-US

Hebrew

he

en-US

Hebrew (Israel)

he-IL

en-US

Hindi

hi

en-US

Hindi (India)

hi-IN

en-US

Yi

ii

en-US

Yi (PRC)

ii-CN

en-US

Inukitut Syllabics

iu-Cans

en-US

Inukitut Syllabics (Canada)

iu-Cans-CA

en-US

Khmer

km

en-US

Khmer (Cambodia)

km-KH

en-US

Kannada

kn

en-US

Kannada (India)

kn-IN

en-US

Konkani

kok

en-US

Konkani (India)

kok-IN

en-US

Lao

lo

en-US

Lao (Lao P.D.R.)

lo-LA

en-US

Malayalam

ml

en-US

Malayalam (India)

ml-IN

en-US

Mohawk

moh

en-US

Mohawk (Canada)

moh-CA

en-US

Marathi

mr

en-US

Marathi (India)

mr-IN

en-US

Nepali

ne

en-US

Nepali (Nepal)

ne-NP

en-US

Norwegian

no

nb-NO

Oriya

or

en-US

Oriya (India)

or-IN

en-US

Punjabi

pa

en-US

Punjabi (India)

pa-IN

en-US

Dari

prs

en-US

Dari (Afghanistan)

prs-AF

en-US

Pashto

ps

en-US

Pashto (Afghanistan)

ps-AF

en-US

Sanskrit

sa

en-US

Sanskrit (India)

sa-IN

en-US

Sinhala

si

en-US

Sinhala (Sri Lanka)

si-LK

en-US

Syriac

syr

en-US

Syriac (Syria)

syr-SY

en-US

Tamil

ta

en-US

Tamil (India)

ta-IN

en-US

Telugu

te

en-US

Telugu (India)

te-IN

en-US

Thai

th

en-US

Thai (Thailand)

th-Th

en-US

Uighur

ug

en-US

Uighur (PRC)

ug-CN

en-US

Urdu

ur

en-US

Urdu (Pakistan)

ur-PK

en-US

Vietnamese

vi

en-US

Vietnamese (Vietnam)

vi-VN

en-US

Your application can use CultureAndRegionInfoBuilder to create a replacement for a culture, and that culture can have a console fallback culture of your choosing.

The following code example displays the fallback user interface culture associated with a culture object.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft