Skip to content

Commit 74ebcc5

Browse files
committed
docs: enhance Android SDK documentation with detailed features and usage examples
1 parent a51006e commit 74ebcc5

File tree

3 files changed

+158
-152
lines changed

3 files changed

+158
-152
lines changed

android-sdk/about.mdx

Lines changed: 16 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -26,36 +26,6 @@ The platform works offline with **caching**, **fallbacks**, **device-aware resou
2626
Tolgee gives you multiple hosting options: Cloud CDN (Cloud or self‑hosting) or your own CDN.
2727
:::
2828

29-
## Features
30-
31-
<FeatureGrid features={[
32-
{
33-
emoji: '🚀',
34-
title: 'Over-the-air updates',
35-
description: 'Update your translations without releasing a new app version',
36-
colorTheme: 'blue'
37-
},
38-
{
39-
emoji: '🔧',
40-
title: 'Multiple format support',
41-
description: '• <strong>Sprintf</strong> (Android SDK) formatting<br/>• <strong>ICU</strong> (Tolgee Native Flat JSON) formatting',
42-
colorTheme: 'green'
43-
},
44-
{
45-
emoji: '',
46-
title: 'Compose integration',
47-
description: 'Full integration with Jetpack Compose and Compose Multiplatform',
48-
colorTheme: 'purple'
49-
},
50-
{
51-
emoji: '🌐',
52-
title: 'Kotlin Multiplatform',
53-
description: 'Designed with multiplatform support in mind',
54-
colorTheme: 'orange'
55-
}
56-
]} />
57-
58-
5929
## Modules
6030

6131
Tolgee Mobile SDK is split into modules so you only add what you need.
@@ -65,11 +35,27 @@ Tolgee Mobile SDK is split into modules so you only add what you need.
6535
- Use with traditional Android Views or any non-Compose UI.
6636
- Provides content delivery (CDN), key lookup, formatting (Sprintf/ICU), caching.
6737
- Start here if you don't use Jetpack Compose.
38+
39+
6840
- **Compose**
6941
- Use with Jetpack Compose or Compose Multiplatform.
7042
- Adds localized composables and helpers (e.g., stringResource, pluralStringResource).
7143
- Requires core transitively.
7244

45+
### Features
46+
- **Core**
47+
- **Over-the-air updates**: Update your translations without releasing a new app version.
48+
- **Multiple format support**: Sprintf (Android SDK) formatting, ICU (Tolgee Native Flat JSON) formatting.
49+
- **Kotlin Multiplatform**: Designed with multiplatform support in mind.
50+
- **Android integration**: Seamless integration with Android resources.
51+
- **Dynamic locale switching**: Change languages at runtime.
52+
53+
- **Compose**
54+
- **Compose Integration**: Use Tolgee translations in your Compose UI with familiar APIs.
55+
- **Android Resource Support**: Seamless integration with Android string resources.
56+
- **Parameter Support**: Pass parameters to your translations.
57+
- **Plural Support**: Handles plural forms.
58+
- **Reactive Updates**: UI automatically updates when translations or locale change.
7359

7460
## Demo apps
7561

android-sdk/quickstart.mdx

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,26 @@ For your app to download translation files, you need to provide a CDN URL prefix
142142
2. Copy the full CDN URL prefix.
143143
3. You can use different prefixes per environment (dev/staging/prod).
144144

145-
### Optional: Verify connectivity locally:
145+
:::info
146+
If you have a different integration setup (for example, using tolgee-cli and bundling JSON translation files in assets), the initialization may look different.
147+
:::
148+
149+
### Other Platforms
150+
151+
For non-Android platforms, initialization is similar but without the Android-specific storage provider:
152+
153+
```kotlin
154+
fun initTolgee() {
155+
Tolgee.init {
156+
contentDelivery {
157+
url = "https://cdn.tolg.ee/your-cdn-url-prefix"
158+
// Create a custom storage provider for caching the latest translations from CDN if needed
159+
}
160+
}
161+
}
162+
```
163+
164+
### **Optional**: Verify connectivity locally:
146165

147166
```bash
148167
curl -I "https://cdn.tolg.ee/your-cdn-url-prefix/en.json"
@@ -152,20 +171,7 @@ You should receive a 200 response.
152171
If you get 403 (Forbidden) or 404 (Not found), double‑check the prefix.
153172

154173
:::tip
155-
Dynamic updates without republishing
156-
:::
157-
158-
To receive **fresh translations without needing to publish new app versions**, wrap the base context in your Activities.
159-
This way, APIs like getString will use Tolgee **dynamically**.
160-
161-
- **With wrapped context** → fresh translations from the Tolgee CDN will be provided automatically.
162-
163-
- **Without wrapped context** → only the translations already bundled or previously cached will be available.
164-
165-
**See the step-by-step guide in Usage.**
166-
167-
:::info
168-
If you have a different integration setup (for example, using tolgee-cli and bundling JSON translation files in assets), the initialization may look different.
174+
Dynamic updates without republishing. See the step-by-step guide in [**Usage**](./usage.mdx).
169175
:::
170176

171177
## Next steps

0 commit comments

Comments
 (0)