Skip to main content

Convert Android strings.xml to iOS Localizable.strings — keys, comments, and translatable flags

Free CLI to convert Android resource XML to iOS .strings. Preserves keys, developer comments, and string values for cross-platform mobile localization.

Free CLI — convert android-xml files to ios-strings:

npm install -g @i18n-agent/i18n-convert
Need to translate, not just convert? Try i18nagent.ai MCP →

Going from Android to iOS is one of the most-requested conversions in mobile localization, and it is also one of the most quietly lossy ones. strings.xml is a structured XML resource with <string> elements, name attributes, optional translatable="false" flags, and XML comments that serve as translator notes. iOS Localizable.strings is a flat key-value list using the "key" = "value"; syntax, with C-style comments — none of the structural metadata maps one-to-one. A naïve converter writes only the names and values and silently drops the comments and translatable markers.

i18n-convert carries XML comments through as C-style /* */ comments above the corresponding entry, preserves the original key names verbatim, and emits entries for resources marked translatable="false" so that they survive a round trip without being dropped by an iOS-only build pipeline. Escaping is corrected automatically: Android's backslash-quote and \\ rules differ from iOS's quoted-string rules. The fixture below is the canonical simple.xml from the project's own test suite, demonstrating a comment, a regular string, and a non-translatable debug flag. This page shows the exact command and the verbatim output produced by the latest CLI build.

Command

i18n-convert simple.xml --to ios-strings -o Localizable.strings

Input

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <!-- App name -->
    <string name="app_name">My App</string>
    <string name="greeting">Hello, World!</string>
    <string name="untranslatable" translatable="false">DEBUG_MODE</string>
</resources>

Output

/* App name */
"app_name" = "My App";

"greeting" = "Hello, World!";

"untranslatable" = "DEBUG_MODE";

Related conversions