Giter Site home page Giter Site logo

Translation into other languages about clowd HOT 3 OPEN

clowd avatar clowd commented on May 24, 2024
Translation into other languages

from clowd.

Comments (3)

caesay avatar caesay commented on May 24, 2024 1

Hi, thanks for your kind comments, I am glad you like it!

Since Clowd has no support for localisation currently, we would need to decide on a localisation architecture before we can start adding translations. I will start thinking about this and look at what localisation frameworks are available for WPF.

from clowd.

caesay avatar caesay commented on May 24, 2024

Just leaving here a suggested implementation.

Move all hard-coded strings into a resx file, with separate keys for plurals. Example:

English:

  • TimeStampDay_One {0} day
  • TimeStampDay_Other {0} days

Polish (4 plural forms)

  • TimestampMonth_One {0} miesiąc temu
  • TimestampMonth_Few {0} miesiące temu
  • TimestampMonth_Many {0} miesięcy temu
  • TimestampMonth_Other {0} miesiąca temu

Ideally, we can find or create a roslyn source generator which turns this into strongly-typed functions. Example:

public class Translations
{
     public string TimeStampDay(int p0);
}

For WPF we could look to generate a pre-built view model that accepts the parameters as properties and emits the strings as properties, or we could use a converter or markup extension. It's possible we can re-use some of https://github.com/rudyhuyn/PluralNet

The resx variations for other languages would be checked in to the main repo, but editing and collaboration could be done online. https://crowdin.com/ is free for open source projects, supports anonymous collaborators and branching, and supports resx natively.
In terms of timelines, I don't think this feature will be worth the time investment to develop unless we already have a handful of people who are using Clowd in other languages, and would volunteer to provide / maintain translations.

If anyone is interested in this getting developed, please comment on this thread to let me know what languages you could contribute.

This is also useful: https://devblogs.microsoft.com/ifdef-windows/use-a-custom-resource-markup-extension-to-succeed-at-ui-string-globalization/

from clowd.

EVOTk avatar EVOTk commented on May 24, 2024

I would enjoy contributing to the French translation!

from clowd.

Related Issues (20)

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.