Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vanniktech/multiplatform-locale
Type Safe Kotlin Multiplatform Locale implementation
https://github.com/vanniktech/multiplatform-locale
android backend ios jvm kotlin kotlin-multiplatform
Last synced: 3 months ago
JSON representation
Type Safe Kotlin Multiplatform Locale implementation
- Host: GitHub
- URL: https://github.com/vanniktech/multiplatform-locale
- Owner: vanniktech
- License: apache-2.0
- Created: 2022-11-07T10:33:15.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-05-21T12:55:26.000Z (8 months ago)
- Last Synced: 2024-05-22T12:35:35.299Z (8 months ago)
- Topics: android, backend, ios, jvm, kotlin, kotlin-multiplatform
- Language: Kotlin
- Homepage:
- Size: 1.93 MB
- Stars: 19
- Watchers: 3
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/funding.yml
- License: LICENSE
Awesome Lists containing this project
- awesome-list - vanniktech/multiplatform-locale - Type Safe Kotlin Multiplatform Locale implementation (Kotlin)
README
Multiplatform Locale
====================A Type Safe Kotlin Multiplatform Locale implementation for your Android App, iOS / Mac App & JVM Backend.
| `Android` | `iOS` | `JVM` |
|:--------------------------------------|:------------------------------|:------------------------------|
| ![Sample Android](sample-android.png) | ![Sample iOS](sample-ios.png) | ![Sample JVM](sample-jvm.png) |# Usage
From Kotlin Multiplatform:
```groovy
kotlin {
sourceSets {
val commonMain by getting {
dependencies {
implementation("com.vanniktech:multiplatform-locale:0.8.0")
}
}
}
}
```From Android / JVM Multiplatform:
```groovy
dependencies {
implementation("com.vanniktech:multiplatform-locale:0.8.0")
}
```From iOS:
```ruby
pod 'MultiplatformLocale', :git => 'https://github.com/vanniktech/multiplatform-locale', :tag => "0.8.0"
```# API
Use `com.vanniktech.locale.Locales`, `com.vanniktech.locale.Country`, `com.vanniktech.locale.Language` & `com.vanniktech.locale.Locale` directly in your platform specific code:
- [sample-android](./sample-android/src/main/kotlin/com/vanniktech/locale/sample/android/LocaleMainActivity.kt)
- [sample-ios](./sample-ios/ios/App.swift)
- [sample-jvm](sample-jvm/src/main/java/com/vanniktech/locale/sample/jvm/LocaleJvm.kt)# License
Copyright (C) 2022 - Niklas Baudy
Licensed under the Apache License, Version 2.0