> For the complete documentation index, see [llms.txt](https://developer.frontitude.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.frontitude.com/developer-cli/file-formats/apple-strings-.strings.md).

# Apple Strings (.strings)

{% hint style="info" %}
Format is automatically detected based on the file extension, so there’s no need to specify the format type when using it. ✨
{% endhint %}

{% hint style="info" %}
This format is supported by both `frontitude pull` and `frontitude push`.
{% endhint %}

### Supported project structure

The Developer CLI assumes a standard project structure in which translation files are named `Localizable.strings` and stored in locale-specific folders. For example:

```
my-ios-app
├── en.lproj
│   └── Localizable.strings     // English translations
├── fr-FR.lproj
│   └── Localizable.strings     // French translations
├── de-DE.lproj
│   └── Localizable.strings     // German translations
```

### Translation paths

{% hint style="warning" %}
The translation paths changed in CLI version 2.0.0 for a source file that is not in a `.lproj` folder.
{% endhint %}

For a source file such as `./Resources/Localizable.strings`, `pull` and `push` now use a `<locale>.lproj` folder inside the source folder: `./Resources/fr.lproj/Localizable.strings`. Earlier versions used `./fr.lproj/Localizable.strings`, one folder up (for `./Localizable.strings`, that was the disk root, and `pull` failed). A source file in a `.lproj` folder is not affected: `./ios/en.lproj/Localizable.strings` still gets `./ios/fr.lproj/Localizable.strings`.

* If a translation file is only at the old path, `pull` and `push` print the warning [`APPLE_TRANSLATION_PATH_MOVED`](https://developer.frontitude.com/developer-cli/errors.md#warnings) that names both paths, and do not read or write the old file.
* If the translation path of a workspace locale is the source file itself, `pull --include-translations` and `push --include-translations` stop with [`TRANSLATION_PATH_IS_SOURCE`](https://developer.frontitude.com/developer-cli/errors.md#update-errors) before they write anything. For example, a source file in `en.lproj` and a workspace locale `en` that is not the source language.

### Comments

{% hint style="info" %}
Existing comments in the file will be preserved when pulling content from Frontitude.
{% endhint %}

Comments are supported in the following format. Comments in other formats will be converted accordingly.

{% code title="Localizable.strings" %}

```javascript
/* Error message shown when there is a network connectivity issue */
"network_error_message" = "Unable to connect. Please check your internet connection.";
```

{% endcode %}

### Variables

While this format supports different types for variables, currently only string variables are supported. Variables defined in Frontitude will be converted into string variables.

{% code title="Localizable.strings" %}

```
"greetings.hello" = "Hello, %@!";
"time.last_seen" = "Last seen at %@";
```

{% endcode %}

### Plurals <a href="#h_6eca633a75" id="h_6eca633a75"></a>

The following key format is used for texts with plurals: `<key>_<plural_type>`. For example:

```
"greetings.hello_one" = "Hello, %@!";
"greetings.hello_many" = "Hello, folks!";
```

{% hint style="warning" %}
From CLI version 2.0.0, `push` can read keys that end in `_zero`, `_one`, `_two`, `_few`, `_many` or `_other` as the plural forms of the key before them, also without `--update`. So `key_one` and `key_other` are now the forms `one` and `other` of `key`, not two components. Which keys count as plural forms follows the same rule as for JSON files, see [Limitations](https://developer.frontitude.com/developer-cli/file-formats/web--json.md#limitations).
{% endhint %}

### Multiline support <a href="#h_6eca633a75" id="h_6eca633a75"></a>

Frontitude uses `\n` to handle multiline strings. For example:

{% code title="Localizable.strings" %}

```
"error.cant_recognize_email" = "We can't recognize this email.\nPlease try again.";
```

{% endcode %}

### File encoding

The supported file encoding is `UTF-16`, which is recommended by Apple. Please contact us if you require a different encoding.
