XLIFF Parser ==================== [![Build Status](https://travis-ci.com/kkostov/hb-rs-xliff.svg?branch=master)](https://travis-ci.com/kkostov/hb-rs-xliff) This is a library for reading and writing localized text stored in XLIFF format. [Docs](https://docs.rs/xliff) ⚠ This is work in progress - check below for the current status of the implementation. ## Examples ### Reading XLIFF file ```rust no-run let path: PathBuf = [env!("CARGO_MANIFEST_DIR"), "tests", "simplev1_2.xliff"] .iter() .collect(); let translations = T::load(&path); let translation = translations.t(None, "Some text"); assert_eq!( translation.source_text().unwrap(), "Some text" ); assert_eq!( translation.target_text().unwrap(), "je précise quelque chose de très..." ); ``` ### Reading XLIFF string ```rust no-run let xliff_string = r#"
HelloWidgets HelloWidgets Translated Bundle name
"#; let translations = T::load_str(xliff_string); let translation = translations.t(None, "CFBundleName"); ``` ## Changelog [Version history](./CHANGELOG.md) ## Parse XLIFF 1.2 [Spec](http://docs.oasis-open.org/xliff/v1.2/os/xliff-core.html) ### Implementation status . - [ ] `` - [x] `` - [x] `
` - [ ] `` - [ ] ` | ` - [ ] `` - [ ] `` - [ ] `note` - [ ] `` - [ ] ` | ` - [ ] `` - [ ] ` | ` - [ ] `` - [ ] `` - [x] `` - [ ] `` - [ ] `` - [x] `` - [x] `` - [ ] `` - [ ] `` - [ ] `` - [ ] `` - [ ] `` - [ ] `` - [ ] `` - [ ] `` - [x] `` - [x] `` - [x] `` - [ ] `` - [ ] `` - [ ] `` - [ ] `` - [ ] `` - [ ] `` - [ ] `` - [x] `` - [ ] `` - [ ] `` - [ ] `` - [ ] `` - [ ] `` - [ ] `` - [ ] `` - [ ] `` - [ ] `` - [ ] `` - [ ] `` - [ ] `` ## Acknowledgements * Depends on [quick-xml](https://crates.io/crates/quick-xml) * The names "OASIS" and "XLIFF" are trademarks of [OASIS](https://www.oasis-open.org/), the owner and developer of the XLIFF specification.