Localize your Android app’s strings.xml file with AI that outperforms human translators. Try it free for 30 days — no credit card required. Choose your target language, add a short description of your app, and upload your strings.xml
file to get a fully translated XML file ready to download.
Localizing Your Android App for the First Time with PTC
Private Translation Cloud (PTC) is an AI translator optimized for software. It translates your resource files into 33 languages in minutes, with human-level quality at machine speed and cost. You can try PTC free for the first 30 days.
Step 1
Sign Up for a 30-Day Free Trial with PTC
Sign up for a 30-day free trial — no credit card required and no limitations.
When you first sign in, choose Manual File Upload to upload your files and translate them into any two languages of your choice.
After the trial, you can keep using PTC by upgrading your account, with no commitment required.
Step 2
Tell PTC About Your App
Tell PTC your app’s name, what it does, and who it is for. This context helps PTC choose the right tone, terminology, and phrasing so the translations feel natural in each language.

Step 3
Upload Your Resource File
The resource file you need to translate is typically located in /app/src/main/res/values/strings.xml
inside your project in Android Studio. Upload this file to PTC.
If you already have some translations, you can upload them as well. However, for best results, we recommend translating from scratch, as PTC generally provides better quality than most human translators.
Step 4
Choose Languages to Translate To
Select any of the supported languages. PTC offers context-aware translation into more than 33 languages.
Step 5
View the Translations in PTC and Download The Translated strings.xml
PTC may take a few minutes to translate your resource file. Once the translation is complete, you can view the results in the Translations tab.

When you’re ready, you can go to the Resource Files tab and download the fully translated resource files for use in Android Studio.

To use the translations in your project, create localized values
folders. For example:
/app/src/main/res/values-es/strings.xml
(for Spanish)/app/src/main/res/values-de/strings.xml
(for German)
Step 6
Rebuild Your App To Display the Available Languages
Once your translated strings.xml
files are in your Git repository, rebuild your app. Android will automatically display the correct language based on the user’s device settings. No additional changes are needed in your code.
Translating Your App’s “Description” With PTC
The description is the text that appears in the Google Play Store for your app. To get the full benefits of localization, you should translate this content as well.

In PTC, go to Translations → Paste to translate and add your app’s short and long description texts.

Since these texts are not part of the strings.xml
resource file, you’ll need to manually copy and paste the translated versions into the Google Play Console:
- Go to Google Play Console → Store Presence → Main Store Listing → Translations
- Add your translated short and long descriptions for each language
- Save and publish
This makes your app discoverable and appealing to users in their own language.

Automating the Translation Process
Once you’ve tried manual translation, you can save time by automating the process with PTC. This way, you don’t need to upload strings.xml
every time something changes. PTC can automatically monitor updates to your resource file and update translations.
Option 1
Integrate PTC Into Your Git Repository
Connect your GitHub, GitLab, or Bitbucket repository to PTC. Specify which branches to monitor. When a change is detected in the strings.xml
file in any of those branches, PTC will automatically translate the updated content and send the translations back via a merge request.

To use Git integration, PTC requires read and write access to your repository. This allows it to retrieve the resource file and push translated files. You can grant access using OAuth or a personal access token.
Option 2
Integrate PTC Into Your CI Process
If you prefer not to give PTC access to your repository, you can still automate translation by connecting your CI workflow to the PTC API. Your CI process can notify PTC when a new version of the strings.xml
file is available. PTC will then process the translation and notify your CI when the translated files are ready to download.
Preparing Android Apps for Continuous Localization (with Demo App Examples)
Now that you’ve seen how PTC automates the translation process, let’s make sure your Android app is ready for it.
This section shows how to structure your project so PTC can detect updates to your strings.xml
file and automatically keep your translations up to date.
We’ll start with a simple Jetpack Compose app that uses hardcoded text and turn it into a localizable project with properly organized resources.
Here’s what we’ll cover:
- Move text from Kotlin into
strings.xml
- Organize localized resources under
res/values-{{lang}}
- Add placeholders and plurals to handle dynamic text and quantities
- See how PTC automatically updates translations for new or modified strings
1. Extract Hardcoded Strings into strings.xml
Start by moving user-facing text from your Jetpack Compose code into a string resource file. This is the foundation of Android localization and lets PTC detect translatable content.
Example
Current code (hardcoded text):
@Composable
fun Greeting(name: String, modifier: Modifier = Modifier) {
Text(
text = "Hello $name!", // Hardcoded string
modifier = modifier
)
}
Move user-facing text into res/values/strings.xml
:
<resources>
<string name="hello_text">Hello %1$s!</string>
</resources>
Update your Kotlin code to use the string resource:
import androidx.compose.ui.res.stringResource
import com.example.androidappdemo.R // adjust if your package name differs
@Composable
fun Greeting(name: String, modifier: Modifier = Modifier) {
val hello = stringResource(id = R.string.hello_text, name)
Text(
text = hello,
modifier = modifier
)
}
Tips:
- Use clear, descriptive string names (for example,
login_button
, notbtn1
). - Group related strings under consistent prefixes (
profile_edit
,profile_save
). - Mark technical terms or labels that shouldn’t be translated with
translatable="false"
.
Commit Reference: Extract hardcoded text to strings.xml for localization
2. Set Up Continuous Localization in PTC
With your strings.xml
file in place, you’re ready to set up PTC and create translations.
- Sign up or log in to PTC.
- Create a new project. The setup wizard will guide you through describing your project so PTC can generate context-aware translations.
- Choose how to integrate PTC with your project for continuous localization. You can connect your GitHub, GitLab, or Bitbucket repository, or use the PTC API to integrate localization into your CI/CD pipeline.
- Configure the file patterns:
- Source file:
app/src/main/res/values/strings.xml
- Translation files:
app/src/main/res/values-{{lang}}/strings.xml
- File type: Android XML
After you complete the setup, PTC automatically generates new folders with translated files (for example, res/values-fr/strings.xml
) and opens a merge request in your repository.
Commit Reference: PTC Android Demo: Automatic Translations
3. Use Placeholders for Dynamic Content
Now that you’ve seen how PTC handles your initial translations, let’s make the app more realistic by adding dynamic strings. These are strings that include changing values—like a user’s name.
Example
Define placeholders in res/values/strings.xml
:
<resources>
<string name="welcome_user">Welcome, %1$s!</string>
<string name="points_summary">%1$s, you have %2$d points.</string>
</resources>
Here:
%1$s
is the first placeholder (a string, for example the user’s name)%2$d
is the second placeholder (an integer, for example, their score)
Use the placeholders in Kotlin:
AndroidDemoTheme {
Scaffold(modifier = Modifier.fillMaxSize()) { innerPadding ->
Column(
modifier = Modifier
.padding(innerPadding)
.padding(16.dp)
) {
// keep Greeting
Greeting(name = "Android")
Spacer(modifier = Modifier.height(16.dp))
// placeholders demo
Header(name = "PTC", points = 42)
Spacer(modifier = Modifier.height(16.dp))
}
@Composable
fun Header(name: String, points: Int) {
val welcome = stringResource(R.string.welcome_user, name)
val summary = stringResource(R.string.points_summary, name, points)
Column(modifier = Modifier.padding(16.dp)) {
Text(welcome)
Text(summary)
}
}
Commit Reference: Add placeholder-based string for dynamic text
Because your project uses continuous localization, PTC will detect these new strings automatically when you commit.
Commit Reference: PTC AndroidAppDemo: Translate placeholder-based string for dynamic text
4. Add Plurals for Quantity-Based Strings
Next, let’s handle plural forms — like “1 message” vs. “5 messages.” Android supports this natively, and PTC translates each plural form automatically.
Example
Add plural resources in res/values/strings.xml
:
<resources>
<plurals name="inbox_count">
<item quantity="one">%d new message</item>
<item quantity="other">%d new messages</item>
</plurals>
</resources>
Use plurals in Kotlin and update your layout to display plural examples:
import androidx.compose.ui.res.pluralStringResource
AndroidDemoTheme {
Scaffold(modifier = Modifier.fillMaxSize()) { innerPadding ->
Column(
modifier = Modifier
.padding(innerPadding)
.padding(16.dp)
) {
// keep Greeting
Greeting(name = "Android")
Spacer(modifier = Modifier.height(16.dp))
// plurals demo
InboxCount(count = 1)
InboxCount(count = 5)
}
@Composable
fun InboxCount(count: Int) {
val text = pluralStringResource(R.plurals.inbox_count, count, count)
Text(text)
}
Commit Reference: Add plural support for item counts
When you push these changes, PTC automatically detects and translates the new plural strings.
Commit Reference: PTC AndroidAppDemo: Translate plural support for item counts
Use PTC to translate other projects
PTC isn’t just for Android — it supports other resource file formats like iOS .strings
, JSON, and more.

Start Your 30-Day FREE Trial
Easily translate your strings.xml
file with PTC and make your Android app ready for global users—all free for 30 days.
