Skip to content

Commit 6fb898f

Browse files
committed
Update Version 0.3
1 parent dc9ae6d commit 6fb898f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1422
-1417
lines changed

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2017 Dirk Bahle
3+
Copyright (c) 2019 Fahmi Rasyid
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

Localization.Demo/App.config

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<?xml version="1.0" encoding="utf-8" ?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
3-
<startup>
4-
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" />
5-
</startup>
6-
</configuration>
3+
<startup>
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/>
5+
</startup>
6+
</configuration>

Localization.Demo/App.xaml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
<Application x:Class="Localization.Demo.App"
2-
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3-
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4-
xmlns:local="clr-namespace:Localization.Demo"
5-
StartupUri="MainWindow.xaml" Startup="Application_Startup">
6-
<Application.Resources>
7-
8-
</Application.Resources>
9-
</Application>
1+
<Application
2+
x:Class="Localization.Demo.App"
3+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
4+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
5+
xmlns:local="clr-namespace:Localization.Demo"
6+
x:Uid="Application_1"
7+
Startup="Application_Startup"
8+
StartupUri="View/MainWindow.xaml">
9+
<Application.Resources />
10+
</Application>

Localization.Demo/App.xaml.cs

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,6 @@
1-
using Localization.Json;
2-
using System;
3-
using System.Collections.Generic;
4-
using System.Configuration;
5-
using System.Data;
6-
using System.Globalization;
7-
using System.IO;
8-
using System.Linq;
9-
using System.Threading.Tasks;
1+
using Rasyidf.Localization;
2+
103
using System.Windows;
11-
using UFA.Localization;
12-
using UFA.Localization.XML;
134

145
namespace Localization.Demo
156
{
@@ -20,16 +11,13 @@ public partial class App : Application
2011
{
2112
protected override void OnStartup(StartupEventArgs e)
2213
{
23-
LanguageManager.ScanLanguagesInFolder("Languages"); // Scan In Language folder
24-
// Set Default Language
25-
LanguageManager.SetLanguage("en-US");
26-
2714
base.OnStartup(e);
15+
LocalizationService.Current.Register("Languages","en-US");
16+
2817
}
2918

30-
private void Application_Startup(object sender, StartupEventArgs e)
19+
void Application_Startup(object sender, StartupEventArgs e)
3120
{
32-
3321
}
3422
}
35-
}
23+
}

Localization.Demo/LanguageManager.cs

Lines changed: 0 additions & 55 deletions
This file was deleted.

Localization.Demo/Languages/de-DE.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8" ?>
2-
<Dictionary EnglishName="German" CultureName="de-DE" Culture="de-DE">
2+
<Pack EnglishName="German" CultureName="Deutsch" Culture="de-DE">
33
<Value Id="0" Title="Demo Window" />
44
<Value Id="11" Header="Datei" />
55
<Value Id="110" Header="Beenden" />
@@ -16,4 +16,4 @@
1616
<Value Id="21" Text="Das ist Dynamisch Sprachen Demo"/>
1717
<Value Id="22" Text="Verfügbare Sprachen auswählen:"/>
1818
<Value Id="24" Text="Sprachen: {0}"/>
19-
</Dictionary>
19+
</Pack>

Localization.Demo/Languages/en-US.xml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8" ?>
2-
<Dictionary EnglishName="English" CultureName="en-US" Culture="en-US">
3-
<Value Id="0" Title="Demo Window" />
2+
<Pack EnglishName="English" CultureName="English" Culture="en-US">
3+
<Value Id="0" Title="Demo Window" />
44
<Value Id="11" Header="File" />
55
<Value Id="110" Header="Exit" />
66
<Value Id="12" Header="Edit" />
@@ -9,11 +9,11 @@
99
<Value Id="122" Header="Paste" />
1010
<Value Id="123" Header="Options" />
1111
<Value Id="13" Header="View" />
12-
<Value Id="130" Header="Status bar" />
13-
<Value Id="14" Header="Languages" />
12+
<Value Id="130" Header="Status bar" />
13+
<Value Id="14" Header="BaseLanguages" />
1414
<Value Id="15" Header="Help" />
1515
<Value Id="150" Header="About" />
16-
<Value Id="21" Text="This is Dynamic Language Demo with UFA.Lang"/>
17-
<Value Id="22" Text="Select Available Languages:"/>
18-
<Value Id="24" Text="Languages: {0}"/>
19-
</Dictionary>
16+
<Value Id="21" Text="This is Dynamic Language Demo with UFA.Lang" />
17+
<Value Id="22" Text="Select Available Languages:" />
18+
<Value Id="24" Text="BaseLanguages: {0}" />
19+
</Pack>

Localization.Demo/Languages/id-ID.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8" ?>
2-
<Dictionary EnglishName="Indonesian" CultureName="id-ID" Culture="id-ID">
3-
<Value Id="0" Title="Jendela Demonstrasi" />
2+
<Pack EnglishName="Indonesian" CultureName="Bahasa Indonesia" Culture="id-ID">
3+
<Value Id="0" Title="Jendela Demonstrasi" />
44
<Value Id="11" Header="Berkas" />
55
<Value Id="110" Header="Keluar" />
66
<Value Id="12" Header="Sunting" />
@@ -9,11 +9,11 @@
99
<Value Id="122" Header="Tempel" />
1010
<Value Id="123" Header="Pilihan" />
1111
<Value Id="13" Header="Tampilan" />
12-
<Value Id="130" Header="Bar status" />
12+
<Value Id="130" Header="Bar status" />
1313
<Value Id="14" Header="Bahasa" />
1414
<Value Id="15" Header="Bantuan" />
1515
<Value Id="150" Header="Tentang" />
16-
<Value Id="21" Text="Ini adalah demonstrasi Bahasa Dinamis dengan UFA.Lang"/>
17-
<Value Id="22" Text="Pilih Bahasa yang tersedia:"/>
18-
<Value Id="24" Text="Bahasa: {0}"/>
19-
</Dictionary>
16+
<Value Id="21" Text="Ini adalah demonstrasi Bahasa Dinamis dengan UFA.Lang" />
17+
<Value Id="22" Text="Pilih Bahasa yang tersedia:" />
18+
<Value Id="24" Text="Bahasa: {0}" />
19+
</Pack>

Localization.Demo/Languages/jv-Latn-ID.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
{
22
"EnglishName": "Javanese",
3-
"CultureName": "jv-Latn-ID",
3+
"CultureName": "Basa Jawa",
44
"Culture": "jv-Latn-ID",
55
"Data": [
66
{
77
"Id": 0,
8-
"Title": "Conto Aplikasi"
8+
"Title": "Contoh Aplikasi"
99
},
1010
{
1111
"Id": 11,
1212
"Header": "Berkas"
1313
},
1414
{
1515
"Id": 110,
16-
"Header": "medal"
16+
"Header": "Medal"
1717
},
1818
{
1919
"Id": 12,
20-
"Header": "cundhuk"
20+
"Header": "Cundhuk"
2121
},
2222
{
2323
"Id": 120,
24-
"Header": "potong"
24+
"Header": "Potong"
2525
},
2626
{
2727
"Id": 121,
@@ -68,4 +68,4 @@
6868
"Text": "Basa: {0}"
6969
}
7070
]
71-
}
71+
}

Localization.Demo/MainWindow.xaml

Lines changed: 0 additions & 42 deletions
This file was deleted.

Localization.Demo/MainWindow.xaml.cs

Lines changed: 0 additions & 69 deletions
This file was deleted.

Localization.Demo/MainWindowViewModel.cs

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)