├── .gitignore ├── EasyLocalization.Demo ├── App.config ├── App.xaml ├── App.xaml.cs ├── EasyLocalization.Demo.csproj ├── MainViewModel.cs ├── MainWindow.xaml ├── MainWindow.xaml.cs ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.resx │ ├── Settings.Designer.cs │ └── Settings.settings ├── Resources │ ├── en-US.txt │ ├── es-ES.xml │ └── fr.json └── packages.config ├── EasyLocalization.sln ├── EasyLocalization.sln.DotSettings ├── EasyLocalization ├── EasyLocalization.csproj ├── Localization │ ├── LocalizationConverter.cs │ ├── LocalizationEntry.cs │ ├── LocalizationManager.cs │ └── LocalizeExtension.cs ├── Properties │ ├── Annotations.cs │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.resx │ ├── Settings.Designer.cs │ └── Settings.settings ├── Readers │ ├── CharSeperatedFileReader.cs │ ├── FileReader.cs │ ├── JsonFileReader.cs │ └── XmlFileReader.cs └── packages.config ├── LICENSE └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | # Download this file using PowerShell v3 under Windows with the following comand: 2 | # Invoke-WebRequest https://gist.githubusercontent.com/kmorcinek/2710267/raw/ -OutFile .gitignore 3 | # or wget: 4 | # wget --no-check-certificate http://gist.githubusercontent.com/kmorcinek/2710267/raw/.gitignore 5 | 6 | # User-specific files 7 | *.suo 8 | *.user 9 | *.sln.docstates 10 | 11 | # Build results 12 | [Dd]ebug/ 13 | [Rr]elease/ 14 | x64/ 15 | [Bb]in/ 16 | [Oo]bj/ 17 | # build folder is nowadays used for build scripts and should not be ignored 18 | #build/ 19 | 20 | # NuGet Packages 21 | *.nupkg 22 | # The packages folder can be ignored because of Package Restore 23 | **/packages/* 24 | # except build/, which is used as an MSBuild target. 25 | !**/packages/build/ 26 | # Uncomment if necessary however generally it will be regenerated when needed 27 | #!**/packages/repositories.config 28 | 29 | # MSTest test Results 30 | [Tt]est[Rr]esult*/ 31 | [Bb]uild[Ll]og.* 32 | 33 | *_i.c 34 | *_p.c 35 | *.ilk 36 | *.meta 37 | *.obj 38 | *.pch 39 | *.pdb 40 | *.pgc 41 | *.pgd 42 | *.rsp 43 | *.sbr 44 | *.tlb 45 | *.tli 46 | *.tlh 47 | *.tmp 48 | *.tmp_proj 49 | *.log 50 | *.vspscc 51 | *.vssscc 52 | .builds 53 | *.pidb 54 | *.log 55 | *.scc 56 | 57 | # OS generated files # 58 | .DS_Store* 59 | Icon? 60 | 61 | # Visual C++ cache files 62 | ipch/ 63 | *.aps 64 | *.ncb 65 | *.opensdf 66 | *.sdf 67 | *.cachefile 68 | 69 | # Visual Studio profiler 70 | *.psess 71 | *.vsp 72 | *.vspx 73 | 74 | # Guidance Automation Toolkit 75 | *.gpState 76 | 77 | # ReSharper is a .NET coding add-in 78 | _ReSharper*/ 79 | *.[Rr]e[Ss]harper 80 | 81 | # TeamCity is a build add-in 82 | _TeamCity* 83 | 84 | # DotCover is a Code Coverage Tool 85 | *.dotCover 86 | 87 | # NCrunch 88 | *.ncrunch* 89 | .*crunch*.local.xml 90 | 91 | # Installshield output folder 92 | [Ee]xpress/ 93 | 94 | # DocProject is a documentation generator add-in 95 | DocProject/buildhelp/ 96 | DocProject/Help/*.HxT 97 | DocProject/Help/*.HxC 98 | DocProject/Help/*.hhc 99 | DocProject/Help/*.hhk 100 | DocProject/Help/*.hhp 101 | DocProject/Help/Html2 102 | DocProject/Help/html 103 | 104 | # Click-Once directory 105 | publish/ 106 | 107 | # Publish Web Output 108 | *.Publish.xml 109 | 110 | # Windows Azure Build Output 111 | csx 112 | *.build.csdef 113 | 114 | # Windows Store app package directory 115 | AppPackages/ 116 | 117 | # Others 118 | *.Cache 119 | ClientBin/ 120 | [Ss]tyle[Cc]op.* 121 | ~$* 122 | *~ 123 | *.dbmdl 124 | *.[Pp]ublish.xml 125 | *.pfx 126 | *.publishsettings 127 | modulesbin/ 128 | tempbin/ 129 | 130 | # EPiServer Site file (VPP) 131 | AppData/ 132 | 133 | # RIA/Silverlight projects 134 | Generated_Code/ 135 | 136 | # Backup & report files from converting an old project file to a newer 137 | # Visual Studio version. Backup files are not needed, because we have git ;-) 138 | _UpgradeReport_Files/ 139 | Backup*/ 140 | UpgradeLog*.XML 141 | UpgradeLog*.htm 142 | 143 | # vim 144 | *.txt~ 145 | *.swp 146 | *.swo 147 | 148 | # svn 149 | .svn 150 | 151 | # Remainings from resolvings conflicts in Source Control 152 | *.orig 153 | 154 | # SQL Server files 155 | **/App_Data/*.mdf 156 | **/App_Data/*.ldf 157 | **/App_Data/*.sdf 158 | 159 | 160 | #LightSwitch generated files 161 | GeneratedArtifacts/ 162 | _Pvt_Extensions/ 163 | ModelManifest.xml 164 | 165 | # ========================= 166 | # Windows detritus 167 | # ========================= 168 | 169 | # Windows image file caches 170 | Thumbs.db 171 | ehthumbs.db 172 | 173 | # Folder config file 174 | Desktop.ini 175 | 176 | # Recycle Bin used on file shares 177 | $RECYCLE.BIN/ 178 | 179 | # Mac desktop service store files 180 | .DS_Store 181 | 182 | # SASS Compiler cache 183 | .sass-cache 184 | 185 | # Visual Studio 2014 CTP 186 | **/*.sln.ide 187 | 188 | # Visual Studio temp something 189 | .vs/ 190 | 191 | # dotnet stuff 192 | project.lock.json 193 | 194 | # VS 2015+ 195 | *.vc.vc.opendb 196 | *.vc.db 197 | 198 | # Rider 199 | .idea/ 200 | 201 | # Output folder used by Webpack or other FE stuff 202 | **/node_modules/* 203 | **/wwwroot/* 204 | 205 | # SpecFlow specific 206 | *.feature.cs 207 | *.feature.xlsx.* 208 | *.Specs_*.html 209 | 210 | ##### 211 | # End of core ignore list, below put you custom 'per project' settings (patterns or path) 212 | ##### 213 | -------------------------------------------------------------------------------- /EasyLocalization.Demo/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /EasyLocalization.Demo/App.xaml: -------------------------------------------------------------------------------- 1 |  6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /EasyLocalization.Demo/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Globalization; 2 | using System.Windows; 3 | using EasyLocalization.Localization; 4 | using EasyLocalization.Readers; 5 | 6 | namespace EasyLocalization.Demo 7 | { 8 | public partial class App 9 | { 10 | 11 | protected override void OnStartup(StartupEventArgs e) 12 | { 13 | base.OnStartup(e); 14 | 15 | LocalizationManager.Instance.AddCulture( 16 | CultureInfo.GetCultureInfo("en-US"), 17 | new CharSeperatedFileReader("Resources/en-US.txt"), 18 | true); 19 | LocalizationManager.Instance.AddCulture( 20 | CultureInfo.GetCultureInfo("es-ES"), 21 | new XmlFileReader("Resources/es-ES.xml")); 22 | LocalizationManager.Instance.AddCulture( 23 | CultureInfo.GetCultureInfo("fr"), 24 | new JsonFileReader("Resources/fr.json")); 25 | } 26 | 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /EasyLocalization.Demo/EasyLocalization.Demo.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {BDB44918-6550-4F73-956A-7AE1CBBE200C} 8 | WinExe 9 | EasyLocalization.Demo 10 | EasyLocalization.Demo 11 | v4.6.1 12 | 512 13 | {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 14 | 4 15 | true 16 | 17 | 18 | AnyCPU 19 | true 20 | full 21 | false 22 | bin\Debug\ 23 | DEBUG;TRACE 24 | prompt 25 | 4 26 | 27 | 28 | AnyCPU 29 | pdbonly 30 | true 31 | bin\Release\ 32 | TRACE 33 | prompt 34 | 4 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 4.0 47 | 48 | 49 | 50 | 51 | 52 | ..\packages\Extended.Wpf.Toolkit.3.2.0\lib\net40\Xceed.Wpf.AvalonDock.dll 53 | 54 | 55 | ..\packages\Extended.Wpf.Toolkit.3.2.0\lib\net40\Xceed.Wpf.AvalonDock.Themes.Aero.dll 56 | 57 | 58 | ..\packages\Extended.Wpf.Toolkit.3.2.0\lib\net40\Xceed.Wpf.AvalonDock.Themes.Metro.dll 59 | 60 | 61 | ..\packages\Extended.Wpf.Toolkit.3.2.0\lib\net40\Xceed.Wpf.AvalonDock.Themes.VS2010.dll 62 | 63 | 64 | ..\packages\Extended.Wpf.Toolkit.3.2.0\lib\net40\Xceed.Wpf.DataGrid.dll 65 | 66 | 67 | ..\packages\Extended.Wpf.Toolkit.3.2.0\lib\net40\Xceed.Wpf.Toolkit.dll 68 | 69 | 70 | 71 | 72 | MSBuild:Compile 73 | Designer 74 | 75 | 76 | MSBuild:Compile 77 | Designer 78 | 79 | 80 | App.xaml 81 | Code 82 | 83 | 84 | 85 | MainWindow.xaml 86 | Code 87 | 88 | 89 | 90 | 91 | Code 92 | 93 | 94 | True 95 | True 96 | Resources.resx 97 | 98 | 99 | True 100 | Settings.settings 101 | True 102 | 103 | 104 | ResXFileCodeGenerator 105 | Designer 106 | Resources.Designer.cs 107 | 108 | 109 | 110 | SettingsSingleFileGenerator 111 | Settings.Designer.cs 112 | 113 | 114 | Always 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | {f6f61592-661c-4b9a-989c-940bc6ada3f2} 123 | EasyLocalization 124 | 125 | 126 | 127 | 128 | Always 129 | 130 | 131 | 132 | 133 | Always 134 | 135 | 136 | 137 | -------------------------------------------------------------------------------- /EasyLocalization.Demo/MainViewModel.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | using System.Runtime.CompilerServices; 3 | using EasyLocalization.Annotations; 4 | 5 | namespace EasyLocalization.Demo 6 | { 7 | public class MainViewModel : INotifyPropertyChanged 8 | { 9 | 10 | #region INotifyPropertyChanged 11 | 12 | public event PropertyChangedEventHandler PropertyChanged; 13 | 14 | [NotifyPropertyChangedInvocator] 15 | protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null) 16 | { 17 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); 18 | } 19 | 20 | #endregion 21 | 22 | #region Fields 23 | 24 | private string _key = "Key22"; 25 | private int _value = 0; 26 | 27 | #endregion 28 | 29 | #region Properties 30 | 31 | public string Key 32 | { 33 | get => _key; 34 | set 35 | { 36 | if (_key == value) 37 | return; 38 | 39 | _key = value; 40 | OnPropertyChanged(); 41 | } 42 | } 43 | 44 | public int Value 45 | { 46 | get => _value; 47 | set 48 | { 49 | if (_value == value) 50 | return; 51 | 52 | _value = value; 53 | OnPropertyChanged(); 54 | } 55 | } 56 | 57 | #endregion 58 | 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /EasyLocalization.Demo/MainWindow.xaml: -------------------------------------------------------------------------------- 1 |  11 | 12 | 13 | 14 | 16 | 19 | 22 | 23 |