Enum Cultures

Source
pub enum Cultures {
Show 39 variants ArSa, BgBg, CaEs, HrHr, CsCz, DaDk, NlNl, EnUs, EtEe, FiFi, FrFr, DeDe, ElGr, HeIl, HiIn, HuHu, ItIt, JaJp, KkKz, KoKr, LvLv, LtLt, NbNo, PlPl, PtBr, PtPt, RoRo, RuRu, SrLatnCs, ZhCn, SkSk, SlSi, EsEs, SvSe, ThTh, ZhHk, ZhTw, TrTr, UkUa,
}
Expand description

The various culture codes for localization.

These are taken from the table in the WixUI localization documentation.

Variants§

§

ArSa

Arabic, Saudi Arabia

§

BgBg

Bulgarian, Bulgaria

§

CaEs

Catalan, Spain

§

HrHr

Croatian, Croatia

§

CsCz

Czech, Czech Republic

§

DaDk

Danish, Denmark

§

NlNl

Dutch, Netherlands

§

EnUs

English, United States

§

EtEe

Estonian, Estonia

§

FiFi

Finnish, Finland

§

FrFr

French, France

§

DeDe

German, Germany

§

ElGr

Greek, Greece

§

HeIl

Hebrew, Israel

§

HiIn

Hindi, India

§

HuHu

Hungarian, Hungary

§

ItIt

Italian, Italy

§

JaJp

Japanese, Japan

§

KkKz

Kazakh, Kazakhstan

§

KoKr

Korean, Korea

§

LvLv

Latvian, Latvia

§

LtLt

Lithuanian, Lithuania

§

NbNo

Norwegian, Norway

§

PlPl

Polish, Poland

§

PtBr

Portuguese, Brazil

§

PtPt

Portuguese, Portugal

§

RoRo

Romanian, Romania

§

RuRu

Russian, Russian

§

SrLatnCs

Serbian, Serbia and Montenegro

§

ZhCn

Simplified Chinese, China

§

SkSk

Slovak, Slovak Republic

§

SlSi

Solvenian, Solvenia

§

EsEs

Spanish, Spain

§

SvSe

Swedish, Sweden

§

ThTh

Thai, Thailand

§

ZhHk

Traditional Chinese, Hong Kong SAR

§

ZhTw

Traditional Chinese, Taiwan

§

TrTr

Turkish, Turkey

§

UkUa

Ukrainian, Ukraine

Implementations§

Source§

impl Cultures

Source

pub fn language(&self) -> &'static str

The language of the culture code.

§Examples
use wix::Cultures;

assert_eq!(Cultures::ArSa.language(), "Arabic");
assert_eq!(Cultures::BgBg.language(), "Bulgarian");
assert_eq!(Cultures::CaEs.language(), "Catalan");
assert_eq!(Cultures::HrHr.language(), "Croatian");
assert_eq!(Cultures::CsCz.language(), "Czech");
assert_eq!(Cultures::DaDk.language(), "Danish");
assert_eq!(Cultures::NlNl.language(), "Dutch");
assert_eq!(Cultures::EnUs.language(), "English");
assert_eq!(Cultures::EtEe.language(), "Estonian");
assert_eq!(Cultures::FiFi.language(), "Finnish");
assert_eq!(Cultures::FrFr.language(), "French");
assert_eq!(Cultures::DeDe.language(), "German");
assert_eq!(Cultures::ElGr.language(), "Greek");
assert_eq!(Cultures::HeIl.language(), "Hebrew");
assert_eq!(Cultures::HiIn.language(), "Hindi");
assert_eq!(Cultures::HuHu.language(), "Hungarian");
assert_eq!(Cultures::ItIt.language(), "Italian");
assert_eq!(Cultures::JaJp.language(), "Japanese");
assert_eq!(Cultures::KkKz.language(), "Kazakh");
assert_eq!(Cultures::KoKr.language(), "Korean");
assert_eq!(Cultures::LvLv.language(), "Latvian");
assert_eq!(Cultures::LtLt.language(), "Lithuanian");
assert_eq!(Cultures::NbNo.language(), "Norwegian");
assert_eq!(Cultures::PlPl.language(), "Polish");
assert_eq!(Cultures::PtBr.language(), "Portuguese");
assert_eq!(Cultures::PtPt.language(), "Portuguese");
assert_eq!(Cultures::RoRo.language(), "Romanian");
assert_eq!(Cultures::RuRu.language(), "Russian");
assert_eq!(Cultures::SrLatnCs.language(), "Serbian (Latin)");
assert_eq!(Cultures::ZhCn.language(), "Simplified Chinese");
assert_eq!(Cultures::SkSk.language(), "Slovak");
assert_eq!(Cultures::SlSi.language(), "Slovenian");
assert_eq!(Cultures::EsEs.language(), "Spanish");
assert_eq!(Cultures::SvSe.language(), "Swedish");
assert_eq!(Cultures::ThTh.language(), "Thai");
assert_eq!(Cultures::ZhHk.language(), "Traditional Chinese");
assert_eq!(Cultures::ZhTw.language(), "Traditional Chinese");
assert_eq!(Cultures::TrTr.language(), "Turkish");
assert_eq!(Cultures::UkUa.language(), "Ukrainian");
Source

pub fn location(&self) -> &'static str

The location of the culture component, typically the country that speaks the language.

§Examples
use wix::Cultures;

assert_eq!(Cultures::ArSa.location(), "Saudi Arabia");
assert_eq!(Cultures::BgBg.location(), "Bulgaria");
assert_eq!(Cultures::CaEs.location(), "Spain");
assert_eq!(Cultures::HrHr.location(), "Croatia");
assert_eq!(Cultures::CsCz.location(), "Czech Republic");
assert_eq!(Cultures::DaDk.location(), "Denmark");
assert_eq!(Cultures::NlNl.location(), "Netherlands");
assert_eq!(Cultures::EnUs.location(), "United States");
assert_eq!(Cultures::EtEe.location(), "Estonia");
assert_eq!(Cultures::FiFi.location(), "Finland");
assert_eq!(Cultures::FrFr.location(), "France");
assert_eq!(Cultures::DeDe.location(), "Germany");
assert_eq!(Cultures::ElGr.location(), "Greece");
assert_eq!(Cultures::HeIl.location(), "Israel");
assert_eq!(Cultures::HiIn.location(), "India");
assert_eq!(Cultures::HuHu.location(), "Hungary");
assert_eq!(Cultures::ItIt.location(), "Italy");
assert_eq!(Cultures::JaJp.location(), "Japan");
assert_eq!(Cultures::KkKz.location(), "Kazakhstan");
assert_eq!(Cultures::KoKr.location(), "Korea");
assert_eq!(Cultures::LvLv.location(), "Latvia");
assert_eq!(Cultures::LtLt.location(), "Lithuania");
assert_eq!(Cultures::NbNo.location(), "Norway");
assert_eq!(Cultures::PlPl.location(), "Poland");
assert_eq!(Cultures::PtBr.location(), "Brazil");
assert_eq!(Cultures::PtPt.location(), "Portugal");
assert_eq!(Cultures::RoRo.location(), "Romania");
assert_eq!(Cultures::RuRu.location(), "Russia");
assert_eq!(Cultures::SrLatnCs.location(), "Serbia and Montenegro");
assert_eq!(Cultures::ZhCn.location(), "China");
assert_eq!(Cultures::SkSk.location(), "Slovak Republic");
assert_eq!(Cultures::SlSi.location(), "Solvenia");
assert_eq!(Cultures::EsEs.location(), "Spain");
assert_eq!(Cultures::SvSe.location(), "Sweden");
assert_eq!(Cultures::ThTh.location(), "Thailand");
assert_eq!(Cultures::ZhHk.location(), "Hong Kong SAR");
assert_eq!(Cultures::ZhTw.location(), "Taiwan");
assert_eq!(Cultures::TrTr.location(), "Turkey");
assert_eq!(Cultures::UkUa.location(), "Ukraine");

Trait Implementations§

Source§

impl Clone for Cultures

Source§

fn clone(&self) -> Cultures

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Cultures

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Cultures

Source§

fn default() -> Cultures

Returns the “default value” for a type. Read more
Source§

impl Display for Cultures

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FromStr for Cultures

Source§

type Err = Error

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
Source§

impl PartialEq for Cultures

Source§

fn eq(&self, other: &Cultures) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for Cultures

Source§

impl StructuralPartialEq for Cultures

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.