Issue
I am writing a Xamarin.Android application using Visual Studio 2022. Unfortunately, the .abb package is required for new applications. This is where the problem with changing the language in the application begins. I am using ContextWrapper to change the language. I have read for the language to work properly in the application, I have to add this code to the BundleConfig.json file:
android {
bundle {
language {
// Specifies that the app bundle should not support
// configuration APKs for language resources. These
// resources are instead packaged with each base and
// dynamic feature APK.
enableSplit = false
}
}
}
Unfortunately, I have nowhere found on the internet how to edit this file and where to find it. Please help.
Solution
You can use the built-in .NET localization framework to set languages in your app, The built-in mechanism for localizing .NET applications uses RESX files and the classes in the System.Resources and System.Globalization namespaces. The RESX files containing translated strings are embedded in the Xamarin.Forms assembly, along with a compiler-generated class that provides strongly-typed access to the translations. The translated text can then be retrieved in code.
You can refer to this document:https://docs.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/localization/text?pivots=windows
Answered By - Adrain Zhu -MSFT
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.