Java Properties format (.properties)
The Java Properties format reads .properties resource bundles,
extracts the value of each entry as a translatable block, and writes the
translations back while preserving keys, comments, and layout. It is the
standard format for Java application and library localization.
Each line is a key=value (or key:value) entry; comment lines begin with
# or !. By default every value is extracted. You can restrict extraction
to entries whose keys match a pattern, treat comments as translator notes,
retain or resolve Java escape sequences, and control non-ASCII escaping in
the output.
How kapi reads it
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
codeFinderRules | array | Regex patterns that match inline codes within translatable text | |
commentsAreNotes | boolean | true | Treat comments as translator notes attached to the following entry |
escapeExtendedChars | boolean | true | Escape extended Unicode characters (non-ASCII) in output using \uXXXX notation |
extraComments | boolean | false | Recognize semicolon and double-slash comment styles in addition to standard # and ! markers |
extractOnlyMatchingKey | boolean | true | When enabled, extract only entries whose keys match the condition; otherwise exclude matching keys |
keyCondition | string | .*text.* | Regular expression pattern to test against property keys for extraction filtering |
separator | string | = | Key-value separator character (typically '=' or ':') |
useCodeFinder | boolean | false | Enable regex-based inline code detection within property values |
useJavaEscapes | boolean | false | Keep Java property escape sequences (\: \= \# \!) in extracted text instead of resolving them |
useKeyCondition | boolean | false | Filter entries for extraction based on a regex condition applied to their keys |
Configure these parameters interactively and copy the YAML on the Format Reference.
Examples
Translate only label keys
Extract only entries whose keys contain "label".
useKeyCondition: true keyCondition: ".*label.*" extractOnlyMatchingKey: true
UTF-8 output
Emit characters literally instead of \uXXXX escapes.
escapeExtendedChars: false
Processing notes
Each entry's value becomes a translatable block; keys, separators, and comments form the non-translatable skeleton.
Multi-line values continued with a trailing backslash are joined per the properties format.
Limitations
The key filter is a single regex applied to each key; there is no per-pattern routing of values to different handlers.
← Back to the Format Reference