AvaloniaUI.QuickGuides
AvaloniaUI.QuickGuides copied to clipboard
At Localization Project, Arabic doesn't work
At Localization Project, at App.axaml.cs you will find this:
public override void OnFrameworkInitializationCompleted()
{
Assets.Resources.Culture = new CultureInfo("ar-IQ");
// Or
// Assets.Resources.Culture = new CultureInfo("ar-SA");
// ....... the rest of the code
base.OnFrameworkInitializationCompleted();
var culture = Assets.Resources.Culture;
}
the resource file 'Resources.ar-IQ.resx' exist and it's simply a copy of the default one 'Resources.resx' I just edited the values. the last line here 'var culture = Assets.Resources.Culture;' clearly get the Arabic Culture. But still the binding '<TextBlock Text="{x:Static assets:Resources.GreetingText}"/>' keep giving the default English words from the English Resource file. Strangely "ja-JP" and "fil-PH" work just fine. I don't know if it's a AvaloniaUI thing or WPF thing.
Aha I found this in the project
<ItemGroup>
<EmbeddedResource Remove="Assets\Resources.ar-IQ.resx" />
</ItemGroup>
deleting it solve the problem, I don't know why it's there.