https://github.com/mondeja/rspolib
Rust port of polib Python library.
https://github.com/mondeja/rspolib
i18n mo mofile po pofile python rust rust-library translation
Last synced: 4 months ago
JSON representation
Rust port of polib Python library.
- Host: GitHub
- URL: https://github.com/mondeja/rspolib
- Owner: mondeja
- License: mit
- Created: 2023-02-27T22:39:57.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2025-01-20T20:36:22.000Z (4 months ago)
- Last Synced: 2025-01-27T07:35:15.316Z (4 months ago)
- Topics: i18n, mo, mofile, po, pofile, python, rust, rust-library, translation
- Language: Rust
- Homepage: https://docs.rs/rspolib
- Size: 139 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
Awesome Lists containing this project
README
# rspolib
[](https://crates.io/crates/rspolib) [](https://pypi.org/project/rspolib) [](https://docs.rs/rspolib) [](https://github.com/mondeja/rspolib/blob/master/python/REFERENCE.md)
Port to Rust of the Python library [polib].
## Install
```bash
cargo add rspolib
```## Usage
```rust
use rspolib::{pofile, prelude::*};let po = pofile("./tests-data/flags.po").unwrap();
for entry in &po.entries {
println!("{}", entry.msgid);
}po.save("./file.po");
```See the documentation at [docs.rs/rspolib](https://docs.rs/rspolib)
## Python bindings
[](https://pypi.org/project/rspolib/#files)
- [Quickstart](https://github.com/mondeja/rspolib/tree/master/python#readme)
- [Reference](https://github.com/mondeja/rspolib/blob/master/python/REFERENCE.md)### Usage
```python
import polib
import rspolibrspo = rspolib.pofile(f"{tests_dir}/django-complete.po")
pypo = polib.pofile(f"{tests_dir}/django-complete.po")
```[polib]: https://github.com/izimobil/polib