How to change the Application language dynamically (Localization) in .Net MAUI?
Localization in .Net MAUI
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
How to change the Application language dynamically (Localization) in .Net MAUI?
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Jithu ThomasRank #437 · 5.7K reputationPosted Nov 2, 2023, 2:44 AM EDT
using System.Globalization;
using Microsoft.Maui.Essentials;
// Initialize localization
var cultureInfo = new CultureInfo("en-US"); // Set your default language here
AppResources.Culture = cultureInfo;
// Set the current culture
CultureInfo.CurrentCulture = cultureInfo;
CultureInfo.CurrentUICulture = cultureInfo;
public void ChangeLanguage(string languageCode)
{
var cultureInfo = new CultureInfo(languageCode);
AppResources.Culture = cultureInfo;
CultureInfo.CurrentCulture = cultureInfo;
CultureInfo.CurrentUICulture = cultureInfo;
}