├── src
├── WPFSharp.Globalizer
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── WPFSharp.Globalizer.Key.snk
│ ├── WPFSharp.Globalizer.csproj
│ ├── FallBackResourceDictionary.cs
│ ├── StyleResourceDictionary.cs
│ ├── GlobalizationResourceDictionary.cs
│ ├── EnhancedResourceDictionary.cs
│ ├── LocalizationBinding.cs
│ ├── ResourceDictionaryChangedEvent.cs
│ ├── Converters
│ │ ├── LocalizationConverter.cs
│ │ ├── MultiValueStringsMatchConverter.cs
│ │ └── LanguageNameConverter.cs
│ ├── Controls
│ │ ├── LanguageSelectionComboBox.cs
│ │ ├── StyleSelectionMenuItemList.cs
│ │ ├── LanguageSelectionMenuItemList.cs
│ │ ├── RelayCommand.cs
│ │ └── LanguageSelectionStyle.xaml
│ ├── IManageResourceDictionaries.cs
│ ├── AvailableLanguages.cs
│ ├── AvailableStyles.cs
│ ├── ResourceDictionaryManagerBase.cs
│ ├── GlobalizedApplication.cs
│ ├── GlobalizedResourceExtension.cs
│ ├── StyleManager.cs
│ └── GlobalizationManager.cs
├── Examples
│ ├── WPF.Globalizer.Example
│ │ ├── Properties
│ │ │ ├── AssemblyInfo.cs
│ │ │ └── DesignTimeResources.xaml
│ │ ├── app.config
│ │ ├── App.xaml.cs
│ │ ├── App.xaml
│ │ ├── MainWindow.xaml.cs
│ │ ├── Globalization
│ │ │ ├── en-US
│ │ │ │ ├── en-US-style.xaml
│ │ │ │ └── en-US.xaml
│ │ │ ├── he-IL
│ │ │ │ ├── he-IL-style.xaml
│ │ │ │ └── he-IL.xaml
│ │ │ └── es-ES
│ │ │ │ ├── es-ES-style.xaml
│ │ │ │ └── es-ES.xaml
│ │ ├── Styles
│ │ │ ├── Default Style.xaml
│ │ │ └── Red.xaml
│ │ ├── WPFSharp.Globalizer.Example.csproj
│ │ ├── WPF.Globalizer.Example.csproj.DotSettings
│ │ └── MainWindow.xaml
│ └── WPFSharp.Globalizer.MVVMExample
│ │ ├── Properties
│ │ ├── AssemblyInfo.cs
│ │ └── DesignTimeResources.xaml
│ │ ├── View
│ │ ├── MainWindow.xaml.cs
│ │ ├── PersonView.xaml.cs
│ │ ├── MainWindow.xaml
│ │ └── PersonView.xaml
│ │ ├── Model
│ │ ├── RelationType.cs
│ │ └── Person.cs
│ │ ├── App.xaml.cs
│ │ ├── Graphics
│ │ └── Icons.xaml
│ │ ├── App.xaml
│ │ ├── ViewModel
│ │ ├── MainWindowViewModel.cs
│ │ └── PersonViewModel.cs
│ │ ├── README.txt
│ │ ├── Styles
│ │ └── Red.xaml
│ │ ├── MVVM
│ │ ├── RelayCommand.cs
│ │ └── ViewModelBase.cs
│ │ └── WPFSharp.Globalizer.MVVMExample.csproj
└── WPFSharp.Globalizer.sln
├── Documentation
└── Images
│ ├── WPFSharp.Globalizer.pdn
│ ├── WPFSharp.Globalizer.png
│ ├── WPF Globalization Example English.png
│ ├── WPF Globalization Example Hebrew.png
│ └── WPF Globalization Example Spanish.png
├── appveyor.yml
├── License.txt
├── .gitignore
└── README.md
/src/WPFSharp.Globalizer/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Examples/WPF.Globalizer.Example/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Examples/WPFSharp.Globalizer.MVVMExample/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Documentation/Images/WPFSharp.Globalizer.pdn:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rhyous/WPFSharp.Globalizer/HEAD/Documentation/Images/WPFSharp.Globalizer.pdn
--------------------------------------------------------------------------------
/Documentation/Images/WPFSharp.Globalizer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rhyous/WPFSharp.Globalizer/HEAD/Documentation/Images/WPFSharp.Globalizer.png
--------------------------------------------------------------------------------
/src/WPFSharp.Globalizer/WPFSharp.Globalizer.Key.snk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rhyous/WPFSharp.Globalizer/HEAD/src/WPFSharp.Globalizer/WPFSharp.Globalizer.Key.snk
--------------------------------------------------------------------------------
/Documentation/Images/WPF Globalization Example English.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rhyous/WPFSharp.Globalizer/HEAD/Documentation/Images/WPF Globalization Example English.png
--------------------------------------------------------------------------------
/Documentation/Images/WPF Globalization Example Hebrew.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rhyous/WPFSharp.Globalizer/HEAD/Documentation/Images/WPF Globalization Example Hebrew.png
--------------------------------------------------------------------------------
/Documentation/Images/WPF Globalization Example Spanish.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rhyous/WPFSharp.Globalizer/HEAD/Documentation/Images/WPF Globalization Example Spanish.png
--------------------------------------------------------------------------------
/src/Examples/WPF.Globalizer.Example/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/src/Examples/WPF.Globalizer.Example/App.xaml.cs:
--------------------------------------------------------------------------------
1 | namespace WPFSharp.Globalizer.Example
2 | {
3 | ///
4 | /// Interaction logic for App.xaml
5 | ///
6 | public partial class App : GlobalizedApplication
7 | {
8 | public App()
9 | {
10 | }
11 | }
12 | }
--------------------------------------------------------------------------------
/src/Examples/WPFSharp.Globalizer.MVVMExample/View/MainWindow.xaml.cs:
--------------------------------------------------------------------------------
1 | using System.Windows;
2 |
3 | namespace WPFSharp.Globalizer.MVVMExample
4 | {
5 | ///
6 | /// Interaction logic for MainWindow.xaml
7 | ///
8 | public partial class MainWindow
9 | {
10 | public MainWindow()
11 | {
12 | InitializeComponent();
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/Examples/WPFSharp.Globalizer.MVVMExample/Model/RelationType.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace WPFSharp.Globalizer.MVVMExample.Model
7 | {
8 | public enum RelationType
9 | {
10 | Unaquainted,
11 | Family,
12 | Friend,
13 | Coworker,
14 | Client,
15 | Religious
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/Examples/WPF.Globalizer.Example/App.xaml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/src/Examples/WPF.Globalizer.Example/Properties/DesignTimeResources.xaml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/src/Examples/WPFSharp.Globalizer.MVVMExample/Properties/DesignTimeResources.xaml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/src/Examples/WPFSharp.Globalizer.MVVMExample/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System.Windows;
2 | using WPFSharp.Globalizer.MVVMExample.ViewModel;
3 |
4 | namespace WPFSharp.Globalizer.MVVMExample
5 | {
6 | ///
7 | /// Interaction logic for App.xaml
8 | ///
9 | public partial class App : GlobalizedApplication
10 | {
11 | protected override void OnStartup(StartupEventArgs e)
12 | {
13 | base.OnStartup(e);
14 | MainWindowViewModel viewmodel = new MainWindowViewModel();
15 | MainWindow main = new MainWindow();
16 | main.DataContext = viewmodel;
17 | main.Show();
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/Examples/WPFSharp.Globalizer.MVVMExample/Graphics/Icons.xaml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
7 |
8 |
--------------------------------------------------------------------------------
/src/Examples/WPFSharp.Globalizer.MVVMExample/App.xaml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/src/Examples/WPF.Globalizer.Example/MainWindow.xaml.cs:
--------------------------------------------------------------------------------
1 | using System.Windows;
2 |
3 | namespace WPFSharp.Globalizer.Example
4 | {
5 | ///
6 | /// Interaction logic for MainWindow.xaml
7 | ///
8 | public partial class MainWindow
9 | {
10 | public MainWindow()
11 | {
12 | InitializeComponent();
13 | }
14 |
15 | private void MenuItem_Exit_Click(object sender, RoutedEventArgs e)
16 | {
17 | Application.Current.Shutdown(0);
18 | }
19 |
20 | private void button1_Click(object sender, RoutedEventArgs e)
21 | {
22 | FirstNameTextBox.Text = LastNameTextBox.Text = AgeTextBox.Text = string.Empty;
23 | }
24 |
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/Examples/WPFSharp.Globalizer.MVVMExample/View/PersonView.xaml.cs:
--------------------------------------------------------------------------------
1 | using System.Windows;
2 | using System.Windows.Controls;
3 |
4 | namespace WPFSharp.Globalizer.MVVMExample.View
5 | {
6 | ///
7 | /// Interaction logic for PersonView.xaml
8 | ///
9 | public partial class PersonView : UserControl
10 | {
11 | public PersonView()
12 | {
13 | InitializeComponent();
14 | }
15 |
16 | private void MenuItem_Exit_Click(object sender, RoutedEventArgs e)
17 | {
18 | Application.Current.Shutdown(0);
19 | }
20 |
21 | private void button1_Click(object sender, RoutedEventArgs e)
22 | {
23 | FirstNameTextBox.Text = LastNameTextBox.Text = AgeTextBox.Text = string.Empty;
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/appveyor.yml:
--------------------------------------------------------------------------------
1 | version: 1.2.{build}
2 | image: Visual Studio 2019
3 | dotnet_csproj:
4 | patch: true
5 | file: '**\*.csproj'
6 | version: '{version}'
7 | version_prefix: '{version}'
8 | package_version: '{version}'
9 | assembly_version: '{version}'
10 | file_version: '{version}'
11 | informational_version: '{version}'
12 | before_build:
13 | - pwsh: nuget restore src/WPFSharp.Globalizer.sln
14 | configuration:
15 | Release
16 | build:
17 | project: src/WPFSharp.Globalizer.sln
18 | verbosity: minimal
19 | test:
20 | categories:
21 | except:
22 | - slow
23 | nuget:
24 | disable_publish_on_pr: true
25 | artifacts:
26 | - path: '**\*.nupkg'
27 | deploy:
28 | - provider: NuGet
29 | on:
30 | branch: master
31 | api_key:
32 | secure: hXdAkbkR+htASNv3WTjj2VOzqpIGLS0yj7JVUEsG3Ujzqpv353hiGCldpMH0WOLh
33 |
--------------------------------------------------------------------------------
/src/Examples/WPF.Globalizer.Example/Globalization/en-US/en-US-style.xaml:
--------------------------------------------------------------------------------
1 |
7 |
8 | LeftToRight
9 | RightToLeft
10 |
11 |
18 |
19 |
--------------------------------------------------------------------------------
/src/Examples/WPFSharp.Globalizer.MVVMExample/View/MainWindow.xaml:
--------------------------------------------------------------------------------
1 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/src/Examples/WPF.Globalizer.Example/Globalization/he-IL/he-IL-style.xaml:
--------------------------------------------------------------------------------
1 |
8 |
9 | RightToLeft
10 | LeftToRight
11 |
12 |
19 |
--------------------------------------------------------------------------------
/src/Examples/WPF.Globalizer.Example/Globalization/es-ES/es-ES-style.xaml:
--------------------------------------------------------------------------------
1 |
8 |
9 | LeftToRight
10 | RightToLeft
11 |
12 |
19 |
20 |
--------------------------------------------------------------------------------
/src/Examples/WPFSharp.Globalizer.MVVMExample/ViewModel/MainWindowViewModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using MVVM;
6 |
7 | namespace WPFSharp.Globalizer.MVVMExample.ViewModel
8 | {
9 | class MainWindowViewModel : ViewModelBase
10 | {
11 | #region Member Variables
12 | private List _ViewModels;
13 | #endregion
14 |
15 | #region Constructors
16 | ///
17 | /// The default constructor
18 | ///
19 | public MainWindowViewModel()
20 | {
21 | ViewModels.Add(new PersonViewModel());
22 | }
23 | #endregion
24 |
25 | #region Properties
26 | public List ViewModels
27 | {
28 | get
29 | {
30 | if (_ViewModels == null)
31 | _ViewModels = new List();
32 | return _ViewModels;
33 | }
34 | }
35 | #endregion
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/Examples/WPFSharp.Globalizer.MVVMExample/README.txt:
--------------------------------------------------------------------------------
1 | This MVVM Project is done now.
2 |
3 | To see how to use globalizer with MVVM, look at:
4 |
5 | 1. PersonViewModel.cs. Notice how the returned text item is a key found in the language xaml file.
6 | 2. en-US.xaml (or other language). Notice the Key returned by PersonViewModel properties is there.
7 | 3. PersonView.xaml. Notice how the labels call LocalizationBinding instead of just Binding.
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/Examples/WPF.Globalizer.Example/Styles/Default Style.xaml:
--------------------------------------------------------------------------------
1 |
8 |
9 | LeftToRight
10 | RightToLeft
11 |
12 | 14
13 |
14 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/Examples/WPFSharp.Globalizer.MVVMExample/Model/Person.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace WPFSharp.Globalizer.MVVMExample.Model
7 | {
8 | class Person
9 | {
10 | #region Constructors
11 | ///
12 | /// The default constructor
13 | ///
14 | public Person()
15 | {
16 | }
17 | #endregion
18 |
19 | #region Properties
20 | public string FirstName
21 | {
22 | get { return _FirstName; }
23 | set { _FirstName = value; }
24 | } private string _FirstName = "Jared";
25 |
26 | public string LastName
27 | {
28 | get { return _LastName; }
29 | set { _LastName = value; }
30 | } private string _LastName = "Barneck";
31 |
32 | public int Age
33 | {
34 | get { return _Age; }
35 | set { _Age = value; }
36 | } private int _Age = 38;
37 | #endregion
38 |
39 | #region Functions
40 | #endregion
41 |
42 | #region Enums
43 | #endregion
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/src/Examples/WPF.Globalizer.Example/Styles/Red.xaml:
--------------------------------------------------------------------------------
1 |
9 |
10 | LeftToRight
11 | RightToLeft
12 |
13 | 14
14 |
15 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/src/Examples/WPFSharp.Globalizer.MVVMExample/Styles/Red.xaml:
--------------------------------------------------------------------------------
1 |
9 |
10 | LeftToRight
11 | RightToLeft
12 |
13 | 14
14 |
15 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/src/Examples/WPF.Globalizer.Example/Globalization/en-US/en-US.xaml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 | WPF Globalization Example (English)
12 |
13 |
14 | _File
15 | _Exit
16 | _Language
17 | _English
18 | _Spanish
19 | _Hebrew
20 |
21 | _Language
22 |
23 |
24 |
25 |
26 |
27 | Last Name
28 | Age
29 | Clear
30 |
31 |
--------------------------------------------------------------------------------
/src/Examples/WPF.Globalizer.Example/Globalization/he-IL/he-IL.xaml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 | WPF Globalization Example (Hebrew)
12 |
13 |
14 | קובץ
15 | קובץ
16 | _שפה
17 | (en-US) אנגלית
18 | (es-ES) ספרדית
19 | (he-IL) עברית
20 |
21 |
22 | (en-US) אנגלית
23 | (es-ES) ספרדית
24 | (he-IL) עברית
25 |
26 |
27 | _שפה
28 |
29 |
30 | שם פרטי
31 | שם משפחה
32 | גיל
33 | ברור
34 |
--------------------------------------------------------------------------------
/src/Examples/WPF.Globalizer.Example/Globalization/es-ES/es-ES.xaml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 | WPF Globalization Example (Spanish)
12 |
13 |
14 | _Archivo
15 | _Salir
16 | _Idioma
17 | _Inglés
18 | _Español
19 | _Hebreo
20 |
21 |
22 | _Inglés (en-US)
23 | _Español (es-ES)
24 | _Hebreo (he-IL)
25 |
26 | _Idioma
27 |
28 |
29 | Nombre de pila
30 | Appellido
31 | Edad
32 | borrar
33 |
34 |
--------------------------------------------------------------------------------
/src/Examples/WPFSharp.Globalizer.MVVMExample/ViewModel/PersonViewModel.cs:
--------------------------------------------------------------------------------
1 | using MVVM;
2 | using WPFSharp.Globalizer.MVVMExample.Model;
3 |
4 | namespace WPFSharp.Globalizer.MVVMExample.ViewModel
5 | {
6 | class PersonViewModel : ViewModelBase
7 | {
8 |
9 | public PersonViewModel()
10 | {
11 | GlobalizedApplication.Instance.GlobalizationManager.ResourceDictionaryChangedEvent += (source, args) => { NotifyPropertyChangedAll(this); };
12 | }
13 |
14 | #region Properties
15 | public string FirstNameLabel { get { return "Form_FirstName"; } }
16 |
17 | public string LastNameLabel { get { return "Form_LastName"; } }
18 |
19 | public string AgeLabel { get { return "Form_Age"; } }
20 |
21 | private Person Person { get { return _Person ?? (_Person = new Person()); } }
22 | private Person _Person;
23 |
24 | public string FirstNameValue
25 | {
26 | get { return Person.FirstName; }
27 | set
28 | {
29 | Person.FirstName = value;
30 | NotifyPropertyChanged("FirstNameValue");
31 | }
32 | }
33 |
34 | public string LastNameValue
35 | {
36 | get { return Person.LastName; }
37 | set
38 | {
39 | Person.LastName = value;
40 | NotifyPropertyChanged("LastNameValue");
41 | }
42 | }
43 |
44 | public int AgeValue
45 | {
46 | get { return Person.Age; }
47 | set
48 | {
49 | Person.Age = value;
50 | NotifyPropertyChanged("AgeValue");
51 | }
52 | }
53 | #endregion
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/src/Examples/WPFSharp.Globalizer.MVVMExample/MVVM/RelayCommand.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Diagnostics;
3 | using System.Windows.Input;
4 |
5 | namespace MVVM
6 | {
7 | ///
8 | /// A command whose sole purpose is to
9 | /// relay its functionality to other
10 | /// objects by invoking delegates. The
11 | /// default return value for the CanExecute
12 | /// method is 'true'.
13 | ///
14 | public class RelayCommand : ICommand
15 | {
16 | #region Fields
17 | readonly Action