Rasyidf.Localization
0.3.0
See the version list below for details.
Requires NuGet 2.12 or higher.
dotnet add package Rasyidf.Localization --version 0.3.0
NuGet\Install-Package Rasyidf.Localization -Version 0.3.0
<PackageReference Include="Rasyidf.Localization" Version="0.3.0" />
paket add Rasyidf.Localization --version 0.3.0
#r "nuget: Rasyidf.Localization, 0.3.0"
// Install Rasyidf.Localization as a Cake Addin
#addin nuget:?package=Rasyidf.Localization&version=0.3.0
// Install Rasyidf.Localization as a Cake Tool
#tool nuget:?package=Rasyidf.Localization&version=0.3.0
Rasyidf Localization
Fast and simple localization framework.
Getting Started
To use this framework. add nuget pack package:
Install-Package Rasyidf.Localization
then register the the services on App.cs
public partial class App : Application
{
protected override void OnStartup(StartupEventArgs e)
{
base.OnStartup(e);
LocalizationService.Current.Register("Assets/Languages", "en-US");
}
...
then you can implement Binding in any XAML like this:
<MenuItem Header="{ul:Tr File, Uid=11}"/>
<TextBlock Text="{ul:Tr Default='Default Hello World', Uid=hello}"/>
<TextBlock Text="{ul:Tr Default, Uid=hello}"/>
<Run>
<ul:Tr Uid="24" Default="Language : {0}, Count : {1} ">
<Binding FallbackValue="en-US" Mode="OneWay"
Path="CurrentLanguage" />
<Binding FallbackValue="0" Mode="OneWay"
Path="LanguageCount" />
</ul:Tr>
</Run>
Then create Language Pack like this into the language folder:
In XML
<Pack EnglishName="English" CultureName="English" Culture="en-US">
<Value Id="11" Header="File" />
<Value Id="110" Header="Exit" />
</Pack>
In Json
{
"EnglishName": "Javanese", "CultureName": "Basa Jawa",
"Culture": "jv-Latn-ID",
"Data": [
{ "Id": 0, "Title": "Contoh" },
{ "Id": 11, "Header": "Berkas" }
]
}
And Done 😃
Authors
- Rasyid, Muhammad Fahmi - Initial work - Rasyidf
See also the list of contributors who participated in this project.
License
This project is licensed under the MIT License - see the LICENSE.md file for details
Acknowledgments
See list of third party components for aditional acknowledgements
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net40 is compatible. net403 was computed. net45 was computed. net451 was computed. net452 was computed. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Functional Release, It's just works