Skip to content

Commit 8928625

Browse files
authored
Fix Typo
1 parent c3bbde3 commit 8928625

File tree

1 file changed

+18
-20
lines changed

1 file changed

+18
-20
lines changed

README.md

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Rasyidf Localization
2-
![Nuget](https://img.shields.io/nuget/dt/Rasyidf.Localization?style=flat-square)
2+
![Nuget](https://img.shields.io/nuget/dt/Rasyidf.Localization)
33

44
Fast and simple localization framework for wpf. allow dynamic loading and multiple language pack.
55

@@ -28,9 +28,9 @@ Then register the the services on App.cs
2828

2929
### Usage
3030

31-
then add namespace in the xaml
31+
after installing and loading th assembly, add namespace in the xaml
3232
``` xml
33-
xmlns:rf="clr-namespace:Rasyidf.Localization;assembly=Rasyidf.Localization"
33+
xmlns:rf="clr-namespace:Rasyidf.Localization;assembly=Rasyidf.Localization"
3434
```
3535
All set, now you can implement Binding in any XAML like this:
3636

@@ -44,31 +44,30 @@ Or this
4444
``` xml
4545
<TextBlock Text="{rf:Tr Default='Default Hello World', Uid=11}"/>
4646
<TextBlock Text="{rf:Tr FallBackText, Uid=12}"/>
47-
Or this, with Format String
4847
```
49-
48+
Or this, with Format String
5049
``` xml
5150
<TextBlock>
52-
<Run>
53-
<rf:Tr Uid="24" Default="Language : {0}, Count : {1} ">
54-
<Binding FallbackValue="en-US" Mode="OneWay"
55-
Path="CurrentLanguage" />
56-
<Binding FallbackValue="0" Mode="OneWay"
57-
Path="LanguageCount" />
58-
</rf:Tr>
59-
</Run>
51+
<Run>
52+
<rf:Tr Uid="24" Default="Language : {0}, Count : {1} ">
53+
<Binding FallbackValue="en-US" Mode="OneWay"
54+
Path="CurrentLanguage" />
55+
<Binding FallbackValue="0" Mode="OneWay"
56+
Path="LanguageCount" />
57+
</rf:Tr>
58+
</Run>
6059
</TextBlock>
6160
```
6261

6362
in code, you can consume directly by using :
6463

6564
```csharp
66-
MessageBox.Show(LocalizationService.GetString("511", "Text", "Default Message"),LocalizationService.GetString("511", "Header","Default Title"));
65+
MessageBox.Show(LocalizationService.GetString("511", "Text", "Default Message"),LocalizationService.GetString("511", "Header","Default Title"));
6766
```
6867
another way is to use String extension. `"[uid],[vid]".Localize("[Default]")`
6968

7069
```csharp
71-
MessageBox.Show("511,Text".Localize("Default Message"),("511,Header").Localize("Default Title"));
70+
MessageBox.Show("511,Text".Localize("Default Message"),("511,Header").Localize("Default Title"));
7271
```
7372

7473
### Language Packs
@@ -95,7 +94,7 @@ The Language Pack can be XML or JSON like below, put in the language folder:
9594

9695
> Version 0.5 Support Json Multilingual Package.
9796

98-
##### Multi Language Pack
97+
##### Single Language Pack
9998

10099
```json
101100
{ "AppId" : "YourAppId",
@@ -119,12 +118,10 @@ The Language Pack can be XML or JSON like below, put in the language folder:
119118
"Author": "Rasyid",
120119
"Languages": [
121120
{
122-
"CultureId": "en-US",
123-
....
121+
"CultureId": "en-US"
124122
},
125123
{
126-
"CultureId": "de-DE",
127-
....
124+
"CultureId": "de-DE"
128125
}
129126
],
130127

@@ -139,6 +136,7 @@ The Language Pack can be XML or JSON like below, put in the language folder:
139136
},
140137
]
141138
}
139+
]
142140
}
143141
}
144142
```

0 commit comments

Comments
 (0)