AvaloniaUI.QuickGuides icon indicating copy to clipboard operation
AvaloniaUI.QuickGuides copied to clipboard

At Localization Project, Arabic doesn't work

Open uSafi opened this issue 2 years ago • 1 comments

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.

uSafi avatar Sep 10 '23 14:09 uSafi

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.

uSafi avatar Sep 10 '23 14:09 uSafi