0

I want to give the user the option to change language so I created two resource files, one for Portuguese and another for English (US).

For the name field I'm giving it names like String1, String2, String3, etc... And in the value field I'm writing the names of my buttons, for PT and EN.

I'm using the following code in my xaml file to bind the strings to my buttons:

<Button Content="{Binding Resources.String5, Source={StaticResource Strings}}" BorderThickness="0" VerticalContentAlignment="Bottom" FontSize="29.333">
                <Button.Background>
                    <ImageBrush Stretch="Uniform" ImageSource="images/Warning-icon.png"/>
                </Button.Background>
</Button>

The problem is in String5. It doesn't show up. It works great for String1 to String4, but after that it doesn't show anymore strings.

Image: http://snag.gy/PLcET.jpg

Is there any string limit for a resource file?

sparcopt
  • 416
  • 2
  • 8
  • 22
  • There are no limits. Are you sure String5 is defined in both resource files? – Alaa Masoud Jun 05 '13 at 13:28
  • @AlaaMasoud Yes, it's defined in the portuguese and english resource files, like the other strings (1,2,3,4) and they all work. After the String4 it doens't show, even if I add a String6. – sparcopt Jun 05 '13 at 13:34

1 Answers1

0

Solved. Besides the PT and EN resource files I also have a String resource file. That is the original file that I created. PT and EN files are a copy of it with the respective culture code (pt-PT and en-US). I had to add String5 in that file as well.

sparcopt
  • 416
  • 2
  • 8
  • 22