projectfluent / fluent

Fluent — planning, spec and documentation
https://projectfluent.org
Apache License 2.0
1.37k stars 43 forks source link

Is unclear how use this library #322

Closed mamcx closed 3 years ago

mamcx commented 3 years ago

I was looking at https://www.arewewebyet.org/topics/i18n/ and because this is at the top, look here https://www.projectfluent.org. However, is unclear how exactly use this. In none of the subprojects are code samples or explanations in how build a localizable app. Where put the files?

Also, how support more than english?:

Software localization has been dominated by an outdated paradigm: translations that map one-to-one to the English copy.

It gives the impression I need to repeat all the syntax per language:

# Simple things are simple.
hello-user = Hello, {$userName}!

So I still think I need to create another file(?):

# Simple things are simple.
hello-user = Hola, {$userName}!

So I not see how the stated improvements apply

zbraniecki commented 3 years ago

@mamcx Based on the link, I assume you're looking for an implementation in Rust, which is https://github.com/projectfluent/fluent-rs You can look at the examples there like https://github.com/projectfluent/fluent-rs/tree/master/fluent-bundle/examples

Or you can use one of the higher-level wrappers like https://crates.io/crates/i18n-embed

I'm going to close it here, but feel free to file an issue in fluent-rs repo asking for better tutorials and documentation. We may not have cycles to do that, but maybe from the community will!