LanguageFactoryFindById Method |
Namespace: AskiaPortalCmn
Find the language using his id
var context = ContextFactory.CreateByUserGuid(Guid.Parse("20BE5F84-F006-49A0-9674-4B16A090AF2D")); var contextValidation = context.Validate(); if (!contextValidation.Success) { throw contextValidation.Exception; } var language = LanguageFactory.FindById(context, context.User.LanguageId); if (language != null) { Console.WriteLine("The user uses the {0} (id={1}) langage", language.Name, language.Id); } else { Console.WriteLine("The specified language was not found."); }