0

I tried using WPFLocalizeExtension and only the default Strings.resx and sometimes the last modified one is shown. Please help me to get back on track! I will attach a .zip of my folder. Thank you for your time!

App.xaml.cs =

public partial class App : Application
{
public App()
{
    LocalizeDictionary.Instance.Culture = CultureInfo.CurrentCulture;
}

}

XAML =

<Window x:Class="WPF_Localization.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"

        mc:Ignorable="d"
        Title="MainWindow" Height="450" Width="800"

        xmlns:lex="http://wpflocalizeextension.codeplex.com"

        lex:LocalizeDictionary.DesignCulture="de"
        lex:ResxLocalizationProvider.DefaultAssembly="WPF_Localization"
        lex:ResxLocalizationProvider.DefaultDictionary="Strings"
        >
    <Grid>
        <Label Name="LabelText"

 Content="{lex:Loc }" Width="400" FontSize="54"   />
        <TextBlock Name="TextBlock" Text="{lex:Loc}" FontSize="35" Margin="22,217,378,136"/>
    </Grid>
</Window>

enter image description here

App link:

https://1drv.ms/u/s!As7XdG-frgtlh41bZtRBzdijPY6MOQ?e=IOBtaL

2
  • 1
    Last modified? If I do this in the constructor of the App class, I get deutsch text as expected: LocalizeDictionary.Instance.Culture = new CultureInfo("de-DE"); Commented Jul 10, 2024 at 14:57
  • Thanks, I ended up doing it via code, I expected to be able to modify it in real time from the XAML. Commented Jul 12, 2024 at 6:48

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.