Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/n7ghtm4r3/mantis
Manage the translation of the content of your applications with Mantis!
https://github.com/n7ghtm4r3/mantis
java jetpack-compose kotlin-multiplatform tecknobit translation
Last synced: about 2 months ago
JSON representation
Manage the translation of the content of your applications with Mantis!
- Host: GitHub
- URL: https://github.com/n7ghtm4r3/mantis
- Owner: N7ghtm4r3
- License: mit
- Created: 2023-12-09T20:34:42.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-29T21:43:27.000Z (about 1 year ago)
- Last Synced: 2024-05-01T23:20:22.202Z (9 months ago)
- Topics: java, jetpack-compose, kotlin-multiplatform, tecknobit, translation
- Language: Java
- Homepage:
- Size: 90.8 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Mantis
**v1.0.0**
Manage the translation of the content of your applications with Mantis!
## Implementation
Add the JitPack repository to your build file
### Gradle
- Add it in your root build.gradle at the end of repositories
#### Gradle (Short)
```gradle
repositories {
...
maven { url 'https://jitpack.io' }
maven { url 'https://repo.clojars.org' }
}
```
#### Gradle (Kotlin)
```gradle
repositories {
...
maven("https://jitpack.io")
maven("https://repo.clojars.org")
}
```
- Add the dependency#### Gradle (Short)
```gradle
dependencies {
implementation 'com.github.N7ghtm4r3:Mantis:1.0.0'
}
```#### Gradle (Kotlin)
```gradle
dependencies {
implementation("com.github.N7ghtm4r3:Mantis:1.0.0")
}
```### Maven
- Add it in your root build.gradle at the end of repositories
```xml
jitpack.io
https://jitpack.io
```
- Add the dependency
```xml
com.github.N7ghtm4r3
Mantis
1.0.0```
### Usage/Examples
#### Resources file
You must place the resources file, named **resource.mantis**, in the resources folder of your application:
``` bash
src
|-- main
|-- resources
| |-- resources.mantis
```Content example:
```json
{
"it": {
"string_one_key" : "ciao!",
"string_two_key": "prova questa libreria :)"
},
"en": {
"string_one_key" : "hello!",
"string_two_key": "try this library :)"
}
}
```#### Workflow
```java
// current locale en
Mantis mantis = new Mantis(Locale.ENGLISH);
System.out.println(mantis.getResource("string_one_key")); // hello!// current locale it
Mantis mantisIt = new Mantis(Locale.ITALIAN);
System.out.println(mantisIt.getResource("string_one_key")); // ciao!// Dynamic translation of any contents
System.out.println(mantis.translate("Hello how are you?")); // Ciao, come stai?
```## Authors
- [@N7ghtm4r3](https://www.github.com/N7ghtm4r3)
## Support
If you need help using the library or encounter any problems or bugs, please contact us via the following links:
- Support via email
- Support via GitHubThank you for your help!
## Badges
[![](https://img.shields.io/badge/Google_Play-414141?style=for-the-badge&logo=google-play&logoColor=white)](https://play.google.com/store/apps/developer?id=Tecknobit)
[![Twitter](https://img.shields.io/badge/Twitter-1DA1F2?style=for-the-badge&logo=twitter&logoColor=white)](https://twitter.com/tecknobit)[![](https://img.shields.io/badge/Java-ED8B00?style=for-the-badge&logo=java&logoColor=white)](https://www.oracle.com/java/)
[![](https://img.shields.io/badge/IntelliJ_IDEA-000000.svg?style=for-the-badge&logo=intellij-idea&logoColor=white)](https://plugins.jetbrains.com/plugin/23386-mantis)[![](https://jitpack.io/v/N7ghtm4r3/Mantis.svg)](https://jitpack.io/#N7ghtm4r3/Mantis)
## Donations
If you want support project and developer
| Crypto | Address | Network |
|-----------------------------------------------------------------------------------------------------|------------------------------------------------|----------|
| ![](https://img.shields.io/badge/Bitcoin-000000?style=for-the-badge&logo=bitcoin&logoColor=white) | **3H3jyCzcRmnxroHthuXh22GXXSmizin2yp** | Bitcoin |
| ![](https://img.shields.io/badge/Ethereum-3C3C3D?style=for-the-badge&logo=Ethereum&logoColor=white) | **0x1b45bc41efeb3ed655b078f95086f25fc83345c4** | Ethereum |If you want support project and developer with PayPal
Copyright © 2023 Tecknobit