Hello,
Welcome to Microsoft Q&A.
If you want to use multiple languages (localization) in UWP, you need to create a text resource file (.resw). Currently, there is no API to obtain the built-in text resources of the system by name.
How to build your multilingual text resource file, please refer to this document: Make your app localizable.
After creating the text resource file, you can get the text resource currently being used by the application through the following code, and get the corresponding value by name:
public string GetLocalizationTextFromResource(string key)
{
var loader = ResourceLoader.GetForCurrentView();
var language = loader.GetString(key);
return language;
}
Then we can use:
ContentDialog noWifiDialog = new ContentDialog
{
Title = "No wifi connection",
Content = "Check your connection and try again.",
CloseButtonText = GetLocalizationTextFromResource("OK")
};
Thanks.