C# Class Teamaton.Lib.LanguageService

Show file Open project: teamaton/speak-lib

Public Properties

Property Type Description
CountryIso2ToLangIso2 string>.Dictionary

Public Methods

Method Description
Fill ( ListControl listControl ) : void

Removes all items before adding all languages alphabetically by name.

Fill ( ListControl listControl, System.Web.UI.WebControls.ListItem firstItem ) : void

Removes all items before adding all languages alphabetically by name.

GetAll ( ) : LanguageList
GetByCountryIso2 ( string countryIso2 ) : Language
GetByIso2 ( string iso2 ) : Language

Does not use the application cache.

GetByIso2 ( string iso2List ) : LanguageList
GetByName ( string name ) : Language
GetDutch ( ) : Language
GetEnglish ( ) : Language
GetFrench ( ) : Language
GetFromUrl ( Uri url ) : Language

Returns a Language object from the subdomain of the given URL. Default is German.

GetGerman ( ) : Language
GetItalian ( ) : Language
GetLangIso2FromCountryIso2 ( string countryIso2 ) : string

Returns the Iso2 code of the language that has been assigned as default for the country with the given Iso2 code.

GetPolish ( ) : Language
GetSpanish ( ) : Language
LanguageService ( ISession session ) : System

Private Methods

Method Description
FillSorted ( ListControl listControl ) : void

Method Details

Fill() public method

Removes all items before adding all languages alphabetically by name.
public Fill ( ListControl listControl ) : void
listControl System.Web.UI.WebControls.ListControl
return void

Fill() public method

Removes all items before adding all languages alphabetically by name.
public Fill ( ListControl listControl, System.Web.UI.WebControls.ListItem firstItem ) : void
listControl System.Web.UI.WebControls.ListControl
firstItem System.Web.UI.WebControls.ListItem
return void

GetAll() public method

public GetAll ( ) : LanguageList
return LanguageList

GetByCountryIso2() public method

public GetByCountryIso2 ( string countryIso2 ) : Language
countryIso2 string
return Language

GetByIso2() public method

Does not use the application cache.
public GetByIso2 ( string iso2 ) : Language
iso2 string
return Language

GetByIso2() public method

public GetByIso2 ( string iso2List ) : LanguageList
iso2List string
return LanguageList

GetByName() public method

public GetByName ( string name ) : Language
name string
return Language

GetDutch() public method

public GetDutch ( ) : Language
return Language

GetEnglish() public method

public GetEnglish ( ) : Language
return Language

GetFrench() public method

public GetFrench ( ) : Language
return Language

GetFromUrl() public method

Returns a Language object from the subdomain of the given URL. Default is German.
public GetFromUrl ( Uri url ) : Language
url System.Uri
return Language

GetGerman() public method

public GetGerman ( ) : Language
return Language

GetItalian() public method

public GetItalian ( ) : Language
return Language

GetLangIso2FromCountryIso2() public method

Returns the Iso2 code of the language that has been assigned as default for the country with the given Iso2 code.
public GetLangIso2FromCountryIso2 ( string countryIso2 ) : string
countryIso2 string
return string

GetPolish() public method

public GetPolish ( ) : Language
return Language

GetSpanish() public method

public GetSpanish ( ) : Language
return Language

LanguageService() public method

public LanguageService ( ISession session ) : System
session ISession
return System

Property Details

CountryIso2ToLangIso2 public static property

Mapping from country iso2 codes to language iso2 codes
public static Dictionary CountryIso2ToLangIso2
return string>.Dictionary