You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+54-6Lines changed: 54 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ Why MultiLanguages is better:
23
23
| Memory Heavy, Hard to Maintain RESX Resource Files |:heavy_check_mark:||
24
24
| Less Memory, Easy to Maintain YAML Resource Files ||:heavy_check_mark:|
25
25
| Generate English Resource YAML File from Localizable Strings from your UI Code ||:heavy_check_mark:|
26
-
| Replace Localizable Strings with Variables ||:heavy_check_mark:|
26
+
|Automatically Replace Localizable Strings with Variables ||:heavy_check_mark:|
27
27
| Data Attribute Localization |:heavy_check_mark:|:heavy_check_mark:|
28
28
| Hierarchal Language Key Support ||:heavy_check_mark:|
29
29
| Translate Resource Files into 69 Different Languages ||:heavy_check_mark:|
@@ -72,24 +72,24 @@ https://youtu.be/Xz68c8GBYz4
72
72
73
73
74
74
# Why YAML
75
-
Most common solution for multilanguage in .NET is the .resx resource files. .resx files are XML based so they are not too friendly to deal with and most likely a GUI tool is needed for keys management. XML is also huge and slower to parse. On the other hand, YAML is new, very fast to parse, and file structure is very simple and doesn't contain any single not-needed character which make the file size too small comparing to the XML one.
75
+
Most common solution for multilanguage in .NET are .resx resource files. .resx files are XML based so they are not too friendly to deal with and most likely a GUI tool is needed for keys management. XML is also huge and slower to parse. On the other hand, YAML is new, very fast to parse, and the file structure is very simple and doesn't contain any unneeded characters which make the file size smaller compared to XML.
76
76
For modern SPA apps with Blazor WebAssembly for example, large language files with .resx might slow down the load time for the download.
77
77
YAML file structure allows for nested objects which a lovely feature you can take advantage of to build an organized language key-values files without long concatenated names.
78
78
Finally, due to the simplicity of YAML, it's makes it very easy to build automation on top of it like source generator and static classes creation.
79
79
80
80
# Features
81
81
AKSoftware.Localization.Multilanguage prvoides all the feature set needed for any multilanguage support like:
82
82
- Easy to get started.
83
-
- Online traslator tool to translate your files in one click for more 65 languages https://akmultilanguages.azurewebsites.net
84
-
- Light and high-performant
83
+
- Online translator tool to translate your files in one click for more 65 languages https://akmultilanguages.azurewebsites.net
84
+
- Light and high-performance
85
85
- Blazor Server & WebAssembly support
86
86
- Out of the box state management for **Blazor** components
87
87
- Multiple language file sources (Files in folder or embedded files)
88
88
- String interpolation support
89
89
- Dynamically list all language keys
90
90
- Dynamically list all available langauges
91
91
- Dependency injection support
92
-
-Hierarcy language keys in YAML
92
+
-Hierarchical language keys in YAML
93
93
- Code generators to generate full keys accessor service, static class with const strings, enums, and more..
94
94
- v6.1 will bring the localization assistant to localize existing apps with minimal effort.
95
95
- Full UWP support
@@ -187,7 +187,7 @@ Welcome: Welcome
187
187
188
188
189
189
190
-
Select the file in the Solution Explorer window and from the properties window set the build action property to "Embeded Resources"
190
+
Select the file in the Solution Explorer window and from the properties window set the build action property to "Embedded Resource"
191
191
192
192
>**Note**
193
193
>In case of using the Source Generator package, that will be taken care of automatically.
@@ -412,6 +412,7 @@ We are currently working on version 6. Here are the upcoming features.
412
412
Verify All Keys Can Be Found](#verify-all-keys-can-be-found)
413
413
*[Verify No Unused Keys](#verify-no-unused-keys)
414
414
*[Verify No Duplicate Keys](#verify-no-duplicate-keys)
If you have multiple projects in your Visual Studio Solution that depend upon language translation, as of version 6.0 and higher you can specify the assembly by name. Place your resources in a project that can be used by the other projects in your Solution.
@@ -817,6 +818,53 @@ public void ReplaceLocalizableStringsWithVariablesExample()
817
818
}
818
819
```
819
820
821
+
## Data Attribute Localization Validation
822
+
In order to localize validation messages, use the Create or Update [Resource File from Localizable Strings](#create-or-update-resource-file-from-localizable-strings) feature. Below is a full Blazor example using a Contact Us Page.
0 commit comments