Code Monkey home page Code Monkey logo

i18n's Introduction

Lepo.i18n

Created with ❤ in Poland by lepo.co
Convenient app translation.

GitHub license Nuget Nuget (with prereleases) Nuget Size Sponsors

Preview image

How to use?

  • Install Lepo.i18n library via NuGet.
  • Add translation files to your application, e.g. Strings/pl_PL.yaml, and mark them as embedded resource.
<ItemGroup>
  <EmbeddedResource Include="Strings\pl_PL.yaml" />
</ItemGroup>
  • Add translations to these files

using direct phrases

Hello World: Witaj Świecie

or keys

main.view.wellcome: Hello World
  • Register selected language
Lepo.i18n.Translator.SetLanguage(
  Assembly.GetExecutingAssembly(),
  "pl_PL",
  "Lepo.i18n.Demo.Strings.pl_PL.yaml"
);
  • Add a library reference in your XAML and start translating.
<Page xmlns:i18n="clr-namespace:Lepo.i18n;assembly=Lepo.i18n">

  <!-- Via markup extension -->
  <TextBlock Text="{i18n:Translate String='Hello World'}"/>

  <!-- Or converter -->
  <wpfui:CardExpander
    Header="{i18n:Translate String='card.networks.title'}"
    Subtitle="{Binding NetworksCount, ConverterParameter='card.networks.detected'
    Converter={StaticResource TranslateConverter}, Mode=OneWay}"/>

</Page>

Compilation

Use Visual Studio 2022 and invoke the .sln.

Visual Studio
Lepo.i18n is an Open Source project. You are entitled to download and use the freely available Visual Studio Community Edition to build, run or develop for Lepo.i18n. As per the Visual Studio Community Edition license, this applies regardless of whether you are an individual or a corporate user.

License

Lepo.i18n is free and open source software licensed under MIT License. You can use it in private and commercial projects.
Keep in mind that you must include a copy of the license in your project.

i18n's People

Contributors

pomianowski avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.