WPF C# Desktop App - Multilingualism, opportunities

Markus Freitag 3,786 Reputation points
2020-08-04T05:47:26.847+00:00

Hello,
Which possibilities do I have to deliver an application multilingual?

  • Switching during runtime.
  • Read out when the app starts
  • With language identifier? Textfile?

Thanks for good tips with examples.

Greetings Markus

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,784 questions
{count} votes

Accepted answer
  1. DaisyTian-1203 11,626 Reputation points
    2020-08-05T02:00:13.527+00:00

    Here is the directory of my demo:
    15510-capture1.png

    Dictionary for De-at.xaml

    <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"  
                        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"  
                        xmlns:s="clr-namespace:System;assembly=mscorlib"  
                        xmlns:local="clr-namespace:MutipleLanguages">  
        <s:String x:Key="btnswitch"> , </s:String>  
        <s:String x:Key="buttonNewTaskWindow">Neu mission</s:String>  
        <s:String x:Key="buttonProperty">Mission eigenschaften</s:String>  
    </ResourceDictionary>  
    

    Dictionary for En-us.xaml
    15691-capture2.png

    In the App.xaml

    15616-capture3.png

    In the MianWindow.xaml
    15569-capture4.png

    MianWindow.xaml.cs

    15692-capture5.png

    Here is the code for you to use.

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Castorix31 85,881 Reputation points
    2020-08-04T06:16:25.357+00:00
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.