Click here to Skip to main content
15,891,253 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: Visual Web Developer express 2010 Pin
arkiboys1-Sep-11 22:07
arkiboys1-Sep-11 22:07 
GeneralRe: Visual Web Developer express 2010 Pin
Abhinav S1-Sep-11 22:29
Abhinav S1-Sep-11 22:29 
AnswerRe: Visual Web Developer express 2010 Pin
Columbus-MCSD2-Sep-11 4:37
Columbus-MCSD2-Sep-11 4:37 
QuestionWpf Pin
radhika 51-Sep-11 18:57
radhika 51-Sep-11 18:57 
AnswerRe: Wpf Pin
Abhinav S1-Sep-11 21:17
Abhinav S1-Sep-11 21:17 
GeneralRe: Wpf Pin
radhika 51-Sep-11 21:23
radhika 51-Sep-11 21:23 
GeneralRe: Wpf Pin
Saksida Bojan9-Sep-11 23:45
Saksida Bojan9-Sep-11 23:45 
QuestionSwitch between diffrent languages with indexers Pin
Mc_Topaz31-Aug-11 21:37
Mc_Topaz31-Aug-11 21:37 
I need to support multi language for an application. The language sources are stored in separate language files where each word in the files has a unique indexer.

For example: In a label I would like to display the word:
* "pants" when selecting US-English as language
* "trousers" when selecting UK-English as language

The US file looks like this:
1=pants
2=truck

The UK file looks like this:
1=trousers
2=lorry

Notice both file contains the same indexes


I use two buttons to select language:
HTML
<Button Click="btnUS_Click" Content="US"></Button>
<Button Click="btnUK_Click" Content="UK"></Button>

With the Click event connected to each button I'm able to read the appropriate language file.


The label I want to display "pants/trousers" is just:
HTML
<Label Name="lblWord"></Label>

In the XAML code I would like to give the the label it's unique index (in this case 1). On way is to store it in the Tag property:
HTML
<Label Name="lblWord" Tag="1"></Label>

But I'm not sure if this is the best way.


Now for my question, how do I display the correct word in the label depending on the selected language and the stored index for it?
AnswerRe: Switch between diffrent languages with indexers Pin
Wayne Gaylard31-Aug-11 23:13
professionalWayne Gaylard31-Aug-11 23:13 
GeneralRe: Switch between diffrent languages with indexers Pin
Mc_Topaz31-Aug-11 23:36
Mc_Topaz31-Aug-11 23:36 
GeneralRe: Switch between diffrent languages with indexers Pin
Wayne Gaylard31-Aug-11 23:40
professionalWayne Gaylard31-Aug-11 23:40 
GeneralRe: Switch between diffrent languages with indexers Pin
Mc_Topaz1-Sep-11 1:57
Mc_Topaz1-Sep-11 1:57 
GeneralRe: Switch between diffrent languages with indexers Pin
Pete O'Hanlon1-Sep-11 2:09
mvePete O'Hanlon1-Sep-11 2:09 
GeneralRe: Switch between diffrent languages with indexers Pin
Mc_Topaz1-Sep-11 2:23
Mc_Topaz1-Sep-11 2:23 
GeneralRe: Switch between diffrent languages with indexers Pin
Pete O'Hanlon1-Sep-11 3:27
mvePete O'Hanlon1-Sep-11 3:27 
GeneralRe: Switch between different languages with indexers Pin
Wayne Gaylard1-Sep-11 21:50
professionalWayne Gaylard1-Sep-11 21:50 
GeneralRe: Switch between different languages with indexers Pin
Pete O'Hanlon1-Sep-11 22:27
mvePete O'Hanlon1-Sep-11 22:27 
GeneralRe: Switch between different languages with indexers Pin
Wayne Gaylard1-Sep-11 23:05
professionalWayne Gaylard1-Sep-11 23:05 
GeneralRe: Switch between different languages with indexers Pin
Pete O'Hanlon1-Sep-11 23:29
mvePete O'Hanlon1-Sep-11 23:29 
GeneralRe: Switch between different languages with indexers Pin
Mycroft Holmes1-Sep-11 23:45
professionalMycroft Holmes1-Sep-11 23:45 
GeneralRe: Switch between diffrent languages with indexers Pin
Wayne Gaylard1-Sep-11 2:39
professionalWayne Gaylard1-Sep-11 2:39 
AnswerRe: Switch between diffrent languages with indexers Pin
Abhinav S1-Sep-11 1:13
Abhinav S1-Sep-11 1:13 
Questionsilverlight - backgroundworker process [modified] Pin
arkiboys31-Aug-11 18:41
arkiboys31-Aug-11 18:41 
AnswerRe: silverlight - backgroundworker process Pin
Mycroft Holmes31-Aug-11 19:28
professionalMycroft Holmes31-Aug-11 19:28 
GeneralRe: silverlight - backgroundworker process Pin
arkiboys31-Aug-11 19:30
arkiboys31-Aug-11 19:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.