| Crates.io | porw |
| lib.rs | porw |
| version | 0.1.0 |
| created_at | 2021-10-20 09:35:25.812821+00 |
| updated_at | 2021-10-20 09:35:25.812821+00 |
| description | Read/Write support for PO translation files. |
| homepage | |
| repository | https://github.com/mglolenstine/po |
| max_upload_size | |
| id | 467815 |
| size | 30,408 |
po is a rust crate for reading and writing PO translation files.
To parse a .po or .pot file, just create a new PoFile
let file = PoFile::new("<PATH>").unwrap();
To update the file PoFile was generated from, use update()
let file = PoFile::new("<PATH>").unwrap();
file.update().unwrap();
To write the PoFile to another file, use write(path)
let file = PoFile::new("<PATH>").unwrap();
file.write("<ANOTHER PATH>").unwrap();
To get the PoFile as the String, equal to the file, use to_string()
let file = PoFile::new("<PATH>").unwrap();
let data = file.to_string();
// Content in `data` will be the same as the one written using `write` or `update`.