<a id="aresource"></a>

# Resurse de șiruri Android

<a id="index-0"></a>

Format de fișier specific Android pentru traducerea aplicațiilor.

#### HINT
A very similar formats are [Compose Multiplatform resources](https://docs.weblate.org/ro/latest/formats/compose-multiplatform-resources.md)
and [Resurse Mobile Kotlin](https://docs.weblate.org/ro/latest/formats/moko-resources.md).

Resursele de șiruri de caractere Android sunt monolingve, [Fișier de limbă de bază monolingvă](https://docs.weblate.org/ro/latest/admin/projects.md#component-template) este stocat într-o locație diferită de celelalte fișiere – `res/values/strings.xml`.

Weblate does following escaping of strings:

* If a strings is valid XML, it is inserted as XML to translation.
* `?` and `@` are escaped with a `\\` at the beginning of the string to avoid interpreting them as style or resource references.
* In case string contains multiple spaces, it is quoted with double quotes (`"`).
* Newlines are escaped as `\\n`, but the actual newline is kept for readability as well.

#### NOTE
Structurile Android string-array nu sunt acceptate în prezent. Pentru a rezolva această problemă, puteți despărți array-urile de șiruri de caractere:

```xml
<string-array name="several_strings">
    <item>First string</item>
    <item>Second string</item>
</string-array>
```

devin:

```xml
<string-array name="several_strings">
    <item>@string/several_strings_0</item>
    <item>@string/several_strings_1</item>
</string-array>
<string name="several_strings_0">First string</string>
<string name="several_strings_1">Second string</string>
```

Rețeaua string-array care indică elementele string ar trebui să fie stocată într-un alt fișier și să nu fie disponibilă pentru traducere.

Acest script poate ajuta la pre-procesarea fișierelor strings.xml și a traducerilor existente: [https://gist.github.com/paour/11291062](https://gist.github.com/paour/11291062)

#### HINT
Pentru a evita traducerea unor șiruri de caractere, acestea pot fi marcate ca netranslatabile. Acest lucru poate fi util în special pentru referințele de șiruri de caractere:

```xml
<string name="foobar" translatable="false">@string/foo</string>
```

#### SEE ALSO
* [Android string resources documentation](https://developer.android.com/guide/topics/resources/string-resource)
* [Compose Multiplatform resources](https://docs.weblate.org/ro/latest/formats/compose-multiplatform-resources.md)
* [Resurse Mobile Kotlin](https://docs.weblate.org/ro/latest/formats/moko-resources.md)
* [Android string resources](https://docs.translatehouse.org/projects/translate-toolkit/en/latest/formats/android.html)

<!-- AUTOGENERATED START: format-features aresource -->
<!-- This section is automatically generated by `./manage.py list_format_features`. Do not edit manually. -->

#### Supported features

| File extensions                                                                                      | `.xml`                                                                              |
|------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------|
| Linguality [ⓘ](https://docs.weblate.org/ro/latest/formats.md#bimono)                                   | Monolingual                                                                         |
| Supports plural [ⓘ](https://docs.weblate.org/ro/latest/formats.md#format-plurals)                      | `Yes`                                                                               |
| Supports descriptions [ⓘ](https://docs.weblate.org/ro/latest/formats.md#format-description)            | `Yes`                                                                               |
| Supports explanation [ⓘ](https://docs.weblate.org/ro/latest/formats.md#format-explanation)             | `No`                                                                                |
| Supports context [ⓘ](https://docs.weblate.org/ro/latest/formats.md#format-context)                     | `No`                                                                                |
| Supports location [ⓘ](https://docs.weblate.org/ro/latest/formats.md#format-location)                   | `No`                                                                                |
| Supports flags [ⓘ](https://docs.weblate.org/ro/latest/formats.md#format-flags)                         | `Yes`                                                                               |
| API identifier                                                                                       | `aresource`                                                                         |
| Supports read-only strings [ⓘ](https://docs.weblate.org/ro/latest/formats.md#read-only-strings)        | `Yes`                                                                               |
| Supports removing obsolete strings [ⓘ](https://docs.weblate.org/ro/latest/formats.md#obsolete-strings) | `No`                                                                                |
| Check flags added by this format [ⓘ](https://docs.weblate.org/ro/latest/admin/checks.md#custom-checks)      | [Format Java](https://docs.weblate.org/ro/latest/user/checks.md#check-java-printf-format) |
<!-- AUTOGENERATED END: format-features aresource -->

## Configurație Weblate

|                                    | Tipic Weblate [Configurația componentei](https://docs.weblate.org/ro/latest/admin/projects.md#component)   |
|------------------------------------|---------------------------------------------------------------------------------------------------|
| Mască de fișier                    | `res/values-*/strings.xml`                                                                        |
| Fișier de limbă de bază monolingvă | `res/values/strings.xml`                                                                          |
| Șablon pentru traduceri noi        | Gol                                                                                               |
| Format fișier                      | Resurse de șiruri Android                                                                         |
