Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/OkaeriPoland/okaeri-i18n
Simple yet powerful localization library built with blazing-fast okaeri-placeholders
https://github.com/OkaeriPoland/okaeri-i18n
i18n java json pluralization translation yaml
Last synced: 12 days ago
JSON representation
Simple yet powerful localization library built with blazing-fast okaeri-placeholders
- Host: GitHub
- URL: https://github.com/OkaeriPoland/okaeri-i18n
- Owner: OkaeriPoland
- License: mit
- Created: 2021-04-08T05:36:59.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-04-06T10:07:06.000Z (7 months ago)
- Last Synced: 2024-08-02T05:13:04.762Z (3 months ago)
- Topics: i18n, java, json, pluralization, translation, yaml
- Language: Java
- Homepage:
- Size: 97.7 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-blazingly-fast - okaeri-i18n - Simple yet powerful localization library built with blazing-fast okaeri-placeholders (Java)
README
# Okaeri Messages (okaeri-i18n)
![License](https://img.shields.io/github/license/OkaeriPoland/okaeri-i18n)
![Total lines](https://img.shields.io/tokei/lines/github/OkaeriPoland/okaeri-i18n)
![Repo size](https://img.shields.io/github/repo-size/OkaeriPoland/okaeri-i18n)
![Contributors](https://img.shields.io/github/contributors/OkaeriPoland/okaeri-i18n)
[![Discord](https://img.shields.io/discord/589089838200913930)](https://discord.gg/hASN5eX)Simple yet powerful localization library built with blazing-fast [okaeri-placeholders](https://github.com/OkaeriPoland/okaeri-placeholders).
Part of the [okaeri-platform](https://github.com/OkaeriPoland/okaeri-platform).## Implementations
- [configs](https://github.com/OkaeriPoland/okaeri-i18n/tree/master/configs): based on [okaeri-configs](https://github.com/OkaeriPoland/okaeri-configs) with support for accessing messages through getters (compile time key checking!)
## Example
See full examples in the [tests](https://github.com/OkaeriPoland/okaeri-i18n/tree/master/configs/src/test/java/eu/okaeri/i18ntest).
```java
// example of manual transformation to String
this.i18n.get(sender, this.messages.getExampleMessage()).apply();
// example of fields use
this.i18n.get(sender, this.messages.getExampleMessage())
.with("name", "John")
.with("age", 123)
.apply();
```