Пример #1
0
        /// <summary>
        /// Creates the select language Menu
        /// </summary>
        /// <returns></returns>
        private Menu CreateChooseLanguageMenu()
        {
            Menu menu = new Menu()
            {
                MenuId      = 0,
                Description = locService.GetString("Please_Select_Language").ToUpper(),
                MenuItems   =
                {
                    new MenuItem()
                    {
                        Description = locService.GetString("Language_Selected_English"),
                        Actions     = new List <Action>()
                        {
                            () => locService.ChangeLanguage(Languages.en), () => CreateCollectionMenu(), () => menuCollection.ShowMenu(1)
                        },
                    },
                    new MenuItem()
                    {
                        Description = locService.GetString("Language_Selected_Spanish"),
                        Actions     = new List <Action>()
                        {
                            () => locService.ChangeLanguage(Languages.es), () => CreateCollectionMenu(), () => menuCollection.ShowMenu(1)
                        },
                    }
                }
            };

            return(menu);
        }
Пример #2
0
        Task SelectCulture( string name )
        {
            LocalizationService.ChangeLanguage( name );

            return Task.CompletedTask;
        }