Skip to main content

Convert Java .properties to iOS Localizable.strings — dotted keys, comments, and escapes

Free CLI to convert Java/Spring .properties files to iOS .strings. Preserves dotted keys, header comments, and empty values for cross-platform porting.

Free CLI — convert java-properties files to ios-strings:

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

Java .properties is the lingua franca of JVM localization — Spring, Struts, vanilla ResourceBundle, every Java desktop app ships one. iOS Localizable.strings is the equivalent on Apple platforms, but the surface differences trip up most converters. Properties files use = (or :, or whitespace) as the delimiter, allow unquoted values with embedded spaces, and treat # and ! as comment markers; iOS strings files use "key" = "value"; with mandatory quoting on both sides, terminating semicolons, and C-style /* */ comments. The unicode escape rules also diverge: properties traditionally escape non-ASCII as \uXXXX, while iOS expects raw UTF-8.

i18n-convert reads the properties file, preserves dotted keys like app.title verbatim (iOS allows any string as a key, dots are fine), promotes leading # header comments into a /* */ block above the first associated entry, and emits an entry even when the value is empty so that the original key set is preserved across the round trip. The fixture below is simple.properties from the test suite — a header comment followed by four entries, one with an empty value. Notice how the # comment becomes a /* */ block, dotted keys like app.title survive unchanged, and empty.value= (an explicit empty assignment in properties, which is meaningful in JVM ResourceBundle semantics) maps to "empty.value" = ""; instead of being dropped.

Command

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

Input

# Application messages
greeting = Hello, World!
farewell = Goodbye!
app.title=My Application
empty.value=

Output

/* Application messages */
"greeting" = "Hello, World!";

"farewell" = "Goodbye!";

"app.title" = "My Application";

"empty.value" = "";

Related conversions