Rasyidf.Localization 0.3.0

A Simple and Fast WPF Localization Framework
     With extensible Language Pack Source.
     
     Supported : XML, JSON

Requires NuGet 2.12 or higher.

Install-Package Rasyidf.Localization -Version 0.3.0
dotnet add package Rasyidf.Localization --version 0.3.0
<PackageReference Include="Rasyidf.Localization" Version="0.3.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Rasyidf.Localization --version 0.3.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

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:

<!-- Bind like this-->
<MenuItem Header="{ul:Tr File, Uid=11}"/>
<!--Or this -->
<TextBlock Text="{ul:Tr Default='Default Hello World', Uid=hello}"/>
<TextBlock Text="{ul:Tr Default, Uid=hello}"/>
<!-- Or this, with Format String -->
<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

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:

<!-- Bind like this-->
<MenuItem Header="{ul:Tr File, Uid=11}"/>
<!--Or this -->
<TextBlock Text="{ul:Tr Default='Default Hello World', Uid=hello}"/>
<TextBlock Text="{ul:Tr Default, Uid=hello}"/>
<!-- Or this, with Format String -->
<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

Release Notes

Functional Release, It's just works

Dependencies

This package has no dependencies.

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
0.3.0 163 1/20/2019
0.2.0 163 1/8/2019