Skip to content

Commit aeeddd3

Browse files
committed
docs: reorganize Android SDK docs and merge modules into overview section
1 parent abdc889 commit aeeddd3

File tree

6 files changed

+84
-137
lines changed

6 files changed

+84
-137
lines changed

android-sdk/about.mdx

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ description: Overview of Tolgee Mobile SDK with Over‑the‑Air (OTA) localizat
77

88
import SystemCard from '@site/src/component/SystemCard';
99
import FeatureGrid from '@site/src/component/FeatureGrid';
10-
import Tolgee from '@site/src/component/Tolgee';
1110

1211
# Tolgee Mobile SDK
1312

@@ -17,9 +16,15 @@ For managing static translations in your repository, consider using the [Tolgee
1716

1817
## Overview
1918

20-
Tolgee Mobile SDK for **Android** and **Compose Multiplatform** lets you localize Kotlin-based applications with **dynamic content delivery**, providing translations dynamically without needing to publish new app versions.
19+
Tolgee Mobile SDK for **Android** and **Compose Multiplatform** lets you localize Kotlin-based applications with **dynamic content delivery**, adapting content to user behavior, preferences, and device data.
2120

22-
**Supports Over‑the‑Air (OTA)** translation updates, seamless integration with **Android Views**, **Jetpack Compose**, **Compose Multiplatform**, and **static translation fallbacks**.
21+
**Supports Over‑the‑Air (OTA)** translation updates, providing translations dynamically **without needing to publish new app versions**.
22+
23+
The platform works offline with **caching**, **fallbacks**, **device-aware resource selection**, and **preloading** of critical namespaces for a smooth user experience. Tolgee **keeps UX consistent** by updating the UI automatically in response to locale changes, resulting in **fewer untranslated or mismatched strings**.
24+
25+
:::info
26+
Tolgee gives you multiple hosting options: Cloud CDN (Cloud or self‑hosting) or your own CDN.
27+
:::
2328

2429
## Features
2530

@@ -50,6 +55,22 @@ Tolgee Mobile SDK for **Android** and **Compose Multiplatform** lets you localiz
5055
}
5156
]} />
5257

58+
59+
## Modules
60+
61+
Tolgee Mobile SDK is split into modules so you only add what you need.
62+
63+
### When to use which module
64+
- **Core**
65+
- Use with traditional Android Views or any non-Compose UI.
66+
- Provides content delivery (CDN), key lookup, formatting (Sprintf/ICU), caching.
67+
- Start here if you don't use Jetpack Compose.
68+
- **Compose**
69+
- Use with Jetpack Compose or Compose Multiplatform.
70+
- Adds localized composables and helpers (e.g., stringResource, pluralStringResource).
71+
- Requires core transitively.
72+
73+
5374
## Demo apps
5475

5576
### 📱 Android Views Demo

android-sdk/get-started.mdx

Lines changed: 21 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -18,61 +18,55 @@ Follow these steps to integrate Tolgee into your Android project and start local
1818
title="Quickstart"
1919
emoji="📦"
2020
description="Set up dependencies and network security configuration"
21-
links={[
22-
{ href: "./quickstart", label: "Quickstart Guide", color: "blue" }
23-
]}
24-
/>
25-
26-
<SystemCard
27-
title="Modules Overview"
28-
emoji="🔧"
29-
description="Choose between Core and Compose modules for your project"
30-
links={[
31-
{ href: "./modules", label: "Modules Guide", color: "green" }
32-
]}
21+
links={[{ href: './quickstart', label: 'Quickstart Guide', color: 'blue' }]}
3322
/>
3423
</div>
3524

3625
## Integration Path
3726

38-
1. **[Quickstart](./quickstart)** - Add Tolgee SDK to your project
39-
2. **[Modules Overview](./modules)** - Understand Core vs Compose modules
40-
3. **Choose your implementation** (see cards below)
41-
4. **[Production Setup](./production)** - Configure for production deployment
27+
### 1. **[Quickstart](./quickstart)** - Add Tolgee SDK to your project
4228

43-
## Choose Your Implementation
29+
### 2. **Choose your implementation**
4430

4531
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 my-6">
4632
<SystemCard
4733
title="Jetpack Compose"
4834
emoji="🚀"
4935
description="Modern declarative UI with reactive translations"
5036
links={[
51-
{ href: "/android-sdk/jetpack", label: "Overview", color: "blue" },
52-
{ href: "/android-sdk/jetpack/installation", label: "Installation", color: "green" },
53-
{ href: "/android-sdk/jetpack/usage", label: "Usage", color: "orange" }
37+
{ href: '/android-sdk/jetpack', label: 'Overview', color: 'blue' },
38+
{
39+
href: '/android-sdk/jetpack/installation',
40+
label: 'Installation',
41+
color: 'green',
42+
},
43+
{ href: '/android-sdk/jetpack/usage', label: 'Usage', color: 'orange' },
5444
]}
5545
/>
56-
46+
5747
<SystemCard
5848
title="Android Views"
5949
emoji="📱"
6050
description="Traditional Android UI with dynamic translations"
61-
links={[
62-
{ href: "./usage", label: "Usage Guide", color: "purple" }
63-
]}
51+
links={[{ href: './usage', label: 'Usage Guide', color: 'purple' }]}
6452
/>
65-
53+
6654
<SystemCard
6755
title="CLI Integration"
6856
emoji=""
6957
description="Generate and manage <strong>static translations</strong>"
7058
links={[
71-
{ href: "/tolgee-cli/installation", label: "Tolgee CLI", color: "cyan" }
59+
{ href: '/tolgee-cli/installation', label: 'Tolgee CLI', color: 'cyan' },
7260
]}
7361
/>
7462
</div>
7563

64+
### 3. **[Production guide](./production)** - Configure for production deployment
65+
66+
:::warning
67+
The Gradle compiler plugin is not released yet and is not part of the current installation options.
68+
:::
69+
7670
## What You'll Achieve
7771

7872
After completing the setup, your app will have:
@@ -90,9 +84,7 @@ After completing the setup, your app will have:
9084
title="Production Guide"
9185
emoji="🚀"
9286
description="Over‑the‑Air (OTA) updates, caching, formatting, and testing for production apps"
93-
links={[
94-
{ href: "./production", label: "Production Setup", color: "blue" }
95-
]}
87+
links={[{ href: './production', label: 'Production Setup', color: 'blue' }]}
9688
/>
9789
</div>
9890

android-sdk/jetpack/installation.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,5 +161,5 @@ If you have a different integration setup (for example, using tolgee-cli and bun
161161
## Next steps
162162

163163
- Learn how to use translations in Compose: [`Usage`](./usage.mdx)
164-
- Not sure which module to use? See [`Modules overview`](../modules.mdx)
164+
- Not sure which module to use? See [`Modules overview`](../about.mdx)
165165
- Having issues? Check [`Troubleshooting`](./troubleshooting.mdx)

android-sdk/modules.mdx

Lines changed: 0 additions & 66 deletions
This file was deleted.

android-sdk/quickstart.mdx

Lines changed: 38 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
id: quickstart
3-
title: Quickstart
3+
title: Quickstart (Core Module)
44
description: Quick start guide for Tolgee Mobile SDK with Core module (traditional Android Views)
55
---
66

@@ -15,21 +15,21 @@ For managing static translations, we recommend using [Tolgee CLI](https://github
1515
<div className="flex items-center gap-3">
1616
<span className="text-2xl">📱</span>
1717
<div>
18-
<h4 className="text-lg font-semibold mb-1 text-blue-800 dark:text-blue-200">Android API Level</h4>
18+
<h4 className="text-lg font-semibold mb-1 text-blue-800 dark:text-blue-200">Android API Level</h4>
1919
<p className="text-sm text-blue-700 dark:text-blue-300 mb-0">Minimum <a href="https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels" className="text-blue-600 dark:text-blue-400 hover:underline">API Level 21+</a> (Android 5.0 and above)</p>
2020
</div>
2121
</div>
2222
</div>
2323
</div>
2424

25-
# Quickstart (Core Module)
25+
# Quickstart
2626

2727
This guide shows you how to integrate Tolgee Mobile SDK using the **Core module** for traditional Android Views.
2828

2929
The **Core module** is a Kotlin Multiplatform library that provides runtime support for Tolgee translations in your app. With Tolgee, you can update your translations **over-the-air** without releasing a new app version.
3030

3131
:::info
32-
Using **Version Catalog** is recommended to keep your versions aligned, especially in bigger projects. This provides **readability, centralization, and consistency**.
32+
Using **Version Catalog** is recommended to keep your versions aligned, especially in bigger projects. This provides **readability, centralization, and consistency**.
3333
:::
3434

3535
:::note
@@ -38,34 +38,34 @@ To build configuration examples use Kotlin DSL (build.gradle.kts). Groovy DSL ma
3838

3939
1. Add dependency (Core):
4040

41-
In `gradle/libs.versions.toml` <u>add an alias for Tolgee library</u>.
41+
In `gradle/libs.versions.toml` <u>add an alias for Tolgee library</u>.
4242

43-
```toml
44-
# gradle/libs.versions.toml
45-
[libraries]
46-
tolgee = { group = "io.tolgee.mobile-kotlin-sdk", name = "core", version.ref = "tolgee" }
47-
```
43+
```toml
44+
# gradle/libs.versions.toml
45+
[libraries]
46+
tolgee = { group = "io.tolgee.mobile-kotlin-sdk", name = "core", version.ref = "tolgee" }
47+
```
4848

49-
Then, in `build.gradle.kts`, <u>use the created alias</u>.
49+
Then, in `build.gradle.kts`, <u>use the created alias</u>.
5050

51-
```kotlin
52-
// build.gradle.kts (module)
53-
dependencies {
54-
implementation(libs.tolgee)
55-
}
56-
```
51+
```kotlin
52+
// build.gradle.kts (module)
53+
dependencies {
54+
implementation(libs.tolgee)
55+
}
56+
```
5757

5858
For **smaller projects** you can also add dependency directly (the old way).
5959

60-
```kotlin
61-
// build.gradle.kts
62-
dependencies {
63-
implementation("io.tolgee.mobile-kotlin-sdk:core:tolgee")
64-
}
65-
```
60+
```kotlin
61+
// build.gradle.kts
62+
dependencies {
63+
implementation("io.tolgee.mobile-kotlin-sdk:core:tolgee")
64+
}
65+
```
6666

6767
:::note
68-
If you use **Jetpack Compose**, see the Compose variant: [Jetpack Quickstart](/android-sdk/jetpack/installation)
68+
If you use **Jetpack Compose**, see the Compose variant: [Jetpack Compose -> Quickstart](/android-sdk/jetpack/installation)
6969
:::
7070

7171
2. (If needed) Ensure repositories include Maven Central:
@@ -75,12 +75,14 @@ If you use **Jetpack Compose**, see the Compose variant: [Jetpack Quickstart](/a
7575
pluginManagement { repositories { gradlePluginPortal(); google(); mavenCentral() } }
7676
dependencyResolutionManagement { repositories { google(); mavenCentral() } }
7777
```
78+
7879
To use the library, **you need to have proper repositories configured** in your project.
7980
Otherwise an error like:
8081

8182
```text
8283
Could not find io.tolgee.mobile-kotlin-sdk:core
8384
```
85+
8486
might pop up.
8587
Make sure **Maven Central** is set up properly so the dependency can be resolved.
8688

@@ -106,7 +108,7 @@ Add network security config to your `AndroidManifest.xml`:
106108
</application>
107109
```
108110

109-
:::note
111+
:::info
110112
Allowing `tolgee.io` and `tolg.ee` domains is required when using Tolgee Cloud CDN. If you only access your own self-hosted CDN, include your domain(s) accordingly.
111113
:::
112114

@@ -130,13 +132,14 @@ class MyApplication : Application() {
130132

131133
When your app boots up, Tolgee is globally initialized. The translations are downloaded from CDN and cached locally. Other parts of your app (such as activities and fragments) can now use Tolgee without additional configuration.
132134

133-
***Make sure that your app knows where to download translations***:
135+
**_Make sure that your app knows where to download translations_**:
134136

135137
For your app to download translation files, you need to provide a CDN URL prefix specific to your project. This prefix points to the catalog that contains your app’s translations.
136138

137139
### How to get your CDN URL prefix (Content Delivery):
140+
138141
1. Open Tolgee Platform → your Project → Developer settings → Content Delivery.
139-
2. Copy the full CDN URL prefix.
142+
2. Copy the full CDN URL prefix.
140143
3. You can use different prefixes per environment (dev/staging/prod).
141144

142145
### Optional: Verify connectivity locally:
@@ -145,31 +148,29 @@ For your app to download translation files, you need to provide a CDN URL prefix
145148
curl -I "https://cdn.tolg.ee/your-cdn-url-prefix/en.json"
146149
```
147150

148-
You should receive a 200 response.
151+
You should receive a 200 response.
149152
If you get 403 (Forbidden) or 404 (Not found), double‑check the prefix.
150153

151154
:::tip
152155
Dynamic updates without republishing
153156
:::
154157

155-
To receive fresh translations without needing to publish new app versions, wrap the base context in your Activities.
156-
This way, APIs like getString() will use Tolgee dynamically.
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**.
157160

158-
- With wrapped context → fresh translations from the Tolgee CDN will be provided automatically.
161+
- **With wrapped context** → fresh translations from the Tolgee CDN will be provided automatically.
159162

160-
- Without wrapped context → only the translations already bundled or previously cached will be available.
163+
- **Without wrapped context** → only the translations already bundled or previously cached will be available.
161164

162-
See the step-by-step guide in Usage.
165+
**See the step-by-step guide in Usage.**
163166

164-
:::note
167+
:::info
165168
If you have a different integration setup (for example, using tolgee-cli and bundling JSON translation files in assets), the initialization may look different.
166169
:::
167170

168-
169171
## Next steps
170172

171-
- Not sure which artifact to use? See [`Modules overview`](./modules.mdx)
173+
- Not sure which artifact to use? See ['overview`](./about.mdx)
172174
- Learn how to fetch and render translations in Views: [`Usage`](./usage.mdx)
173175
- Using Compose? Start here: [`Jetpack Installation`](./jetpack/installation.mdx)
174176
- Having issues? Check [`Troubleshooting`](./troubleshooting.mdx)
175-

sidebarAndroidSdk.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ module.exports = {
33
'about',
44
'get-started',
55
'quickstart',
6-
'modules',
76
'usage',
87
{
98
type: 'category',

0 commit comments

Comments
 (0)