Using the Language Namespace
The language namespace is contained within the RuntimeData assembly. The general parameters for using the language namespace, and accessing namespace properties and attributes, are as follows:
- To call the current language (CurrentLanguage attribute):
Call CurrentLanguage Copy Codevar CurrentLanguage = ArchestrA.Client.MyViewApp.Language.CurrentLanguage; // Get property change notification from event subscription. ArchestrA.Client.MyViewApp.Language.PropertyChanged + = this.LanguagePropertyChanged; private void LanguagePropertyChanged(object sender, PropertyChangedEventArgs e) // e.PropertyName will return the "CurrentLanguage" language attribute value.
- To call the current locale ID (CurrentLCID attribute):
Call CurrentLCID Copy Codevar CurrentLCID = ArchestrA.Client.MyViewApp.Language.CurrentLCID; // Get property change notification from event subscription. ArchestrA.Client.MyViewApp.Language.PropertyChanged + = this.LanguagePropertyChanged; private void LanguagePropertyChanged(object sender, PropertyChangedEventArgs e) // e.PropertyName will return the "CurrentLCID" language attribute value.
- To call the current culture information (CurrentCultureInfo attribute):
Call CurrentCultureInfo Copy Codevar CurrentLCID = ArchestrA.Client.MyViewApp.Language.CurrentLCID; // Get property change notification from event subscription. ArchestrA.Client.MyViewApp.Language.PropertyChanged + = this.LanguagePropertyChanged; private void LanguagePropertyChanged(object sender, PropertyChangedEventArgs e) // e.PropertyName will return the "CurrentLCID" language attribute value.
- To return the list of configured languages:
Return Languages Copy Codevar languages = ArchestrA.Client.MyViewApp.Language.Languages;
- To return the list of configured LCIDs:
Example Title Copy Codevar lcids= ArchestrA.Client.MyViewApp.Language.Lcids;
- To return the list of configured CultureInfos:
Return CultureInfos Copy Codevar CultureInfos = ArchestrA.Client.MyViewApp.Language.CultureInfos;