iOS String Files

Extension .strings
Smartling identifier ios
Example File ios.strings
Resources String Resources

Keys/Variants

Every string is created with key/variant metadata based on the keys in the file. If the keys are different for two strings with the same value, Smartling will create two strings using the key as context metadata.

String Instructions

Smartling will automatically ingest and display file comments as instructions for translators. The comments must immediately precede the string. For example, for the following comment:

/* Back button label */
"Back" = "Back";

the text "Back button label" will be captured as a file instruction

If the comment contains the following text:

/* No comment provided by engineer. */

or if a line separates the comment and string, such as:

/* Back button label */

"Back" = "Back";

Smartling will not create an instruction.

Directives

Directive Format

// smartling.[directive_name] = [value]

The directive must be a single comment on one line, and there should not be any inline trailing symbols after the directive. Directives apply to all strings that follow them. Directives can be changed throughout the file.

Note: The standard comment format of /* ... */ will not work for directives.

placeholder_format_custom

Values:1. Custom regular expression (pcre)
2. NONE - disable custom placeholders
Description:Used to define a custom placeholder format for strings in the file. See Placeholders in Resource Files for more information.
Examples:
// smartling.placeholder_format_custom = \[.+?\]

Any characters surrounded by square brackets will be treated as a placeholder.

placeholder_format

Values:NONE; C; IOS; PYTHON; JAVA; YAML; QT; RESX
Description:Used to specify a standard placeholder format. See Placeholders in Resource Files for more information.
Examples:
// smartling.placeholder_format = IOS

Specifies iOS-style placeholders for the file.

pseudo_inflation

Values:int - Accepted values are 0-100
Description:Sets the percentage by which original strings are inflated when downloading pseudo translations. If this directive is not set, pseudo translations are 30 percent longer than the original strings.
Examples:
// smartling.pseudo_inflation = 80

Downloaded pseudo translations will increase the length of original strings by 80 percent.