Enum wix::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

§

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<Cultures> for Cultures

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method 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 StructuralEq for Cultures

source§

impl StructuralPartialEq for Cultures

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

const: unstable · 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> ToOwned for Twhere T: Clone,

§

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 Twhere T: Display + ?Sized,

source§

default fn to_string(&self) -> String

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

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

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.