docs.rs failed to build simple-localization-0.2.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
simple-localization-0.1.1
simple-localization
Simple localization library
Usage
This directory tree must be in your project:
Inside the localization files (example: localization/tr_TR):
// One Line Example
"Hello" => "Merhaba"
"How are you?" => "Nasılsın?"
"This is a long text" => "Bu uzun bir yazı"
// Multiline Example
#"This is a multiline text.
You can write anything you want here.
Don't need to use \n.
The translation of this is next the quoted text."#
=>
#"Bu bir çok satırlı yazı.
Buraya istediğin her şeyi yazabilirsin.
\n kullanman gerekmez.
Bu yazının çevirisi bir sonraki tırnak içindeki yazıdır."#
tr() usage in your main.rs:
use tr;
// localization/tr_TR file exists and `LANG=tr_TR.UTF-8`
let text:&str = tr; // "Merhaba"
// localization/tr_TR file doesn't exists and `LANG=tr_TR.UTF-8`
let text:&str = tr; // "Hello"
// localization/ar_QA file doesn't exists and `LANG=ar_QA.UTF-8`
let text:&str = tr; // "Hello"
trl() usage in your main.rs:
use trl;
// localization/tr_TR file exists
let text:&str = trl; // "Merhaba"
// localization/ar_QA file exists
let text:&str = trl; // "مرحبًا"
// localization/tr_TR file doesn't exists
let text:&str = trl; // "Hello"