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

# Resursi Android izraza

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

Android specific file format for translating applications.

#### HINT
A very similar formats are [Compose Multiplatform resursi](https://docs.weblate.org/hr/latest/formats/compose-multiplatform-resources.md)
and [Kotlin resursi za mobilne uređaje](https://docs.weblate.org/hr/latest/formats/moko-resources.md).

Android string resources are monolingual, the [Jednojezična datoteka osnovnog jezika](https://docs.weblate.org/hr/latest/admin/projects.md#component-template) is
stored in a different location from the other files – `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
Android string-array structures are not currently supported. To work around this,
you can break your string arrays apart:

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

become:

```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>
```

The string-array that points to the string elements should be stored in a different
file, and not be made available for translation.

This script may help pre-process your existing strings.xml files and translations: [https://gist.github.com/paour/11291062](https://gist.github.com/paour/11291062)

#### HINT
To avoid translating some strings, these can be marked as non-translatable. This can be especially useful for string references:

```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 resursi](https://docs.weblate.org/hr/latest/formats/compose-multiplatform-resources.md)
* [Kotlin resursi za mobilne uređaje](https://docs.weblate.org/hr/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. -->

#### Podržane funkcije

| Datotečni sufiks                                                                                           | `.xml`                                                                              |
|------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------|
| Jezičnost [ⓘ](https://docs.weblate.org/hr/latest/formats.md#bimono)                                          | Jednojezične                                                                        |
| Podržava množinu [ⓘ](https://docs.weblate.org/hr/latest/formats.md#format-plurals)                           | `Yes`                                                                               |
| Podržava opise [ⓘ](https://docs.weblate.org/hr/latest/formats.md#format-description)                         | `Yes`                                                                               |
| Podržava objašnjenja [ⓘ](https://docs.weblate.org/hr/latest/formats.md#format-explanation)                   | `No`                                                                                |
| Podržava kontekst [ⓘ](https://docs.weblate.org/hr/latest/formats.md#format-context)                          | `No`                                                                                |
| Podržava mjesto [ⓘ](https://docs.weblate.org/hr/latest/formats.md#format-location)                           | `No`                                                                                |
| Podržava oznake [ⓘ](https://docs.weblate.org/hr/latest/formats.md#format-flags)                              | `Yes`                                                                               |
| Identifikator API-ja                                                                                       | `aresource`                                                                         |
| Podržava izraze koji su samo-za-čitanje [ⓘ](https://docs.weblate.org/hr/latest/formats.md#read-only-strings) | `Yes`                                                                               |
| Supports removing obsolete strings [ⓘ](https://docs.weblate.org/hr/latest/formats.md#obsolete-strings)       | `No`                                                                                |
| Provjeri oznake koje je dodao ovaj format [ⓘ](https://docs.weblate.org/hr/latest/admin/checks.md#custom-checks)   | [Java format](https://docs.weblate.org/hr/latest/user/checks.md#check-java-printf-format) |
<!-- AUTOGENERATED END: format-features aresource -->

## Weblate konfiguracija

|                                       | Typical Weblate [Konfiguracija komponente](https://docs.weblate.org/hr/latest/admin/projects.md#component)   |
|---------------------------------------|-----------------------------------------------------------------------------------------------------|
| Maska datoteke                        | `res/values-*/strings.xml`                                                                          |
| Jednojezična datoteka osnovnog jezika | `res/values/strings.xml`                                                                            |
| Predložak za nove prijevode           | Empty                                                                                               |
| Format datoteke                       | Resursi Android izraza                                                                              |
