Update example for I18N custom keys (#2117)
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>pull/2128/head
parent
0d67c5c2ec
commit
bdb37078aa
|
@ -408,19 +408,25 @@ The keys are unique across the whole bundle, so a constant can reference any key
|
||||||
|
|
||||||
The following snippet shows a binding XML that uses custom keys:
|
The following snippet shows a binding XML that uses custom keys:
|
||||||
|
|
||||||
XML file (`binding.xml`):
|
XML file (`addon.xml`):
|
||||||
|
|
||||||
```xml
|
```xml
|
||||||
<binding:binding id="acmeweather">
|
<addon:addon id="acmeweather">
|
||||||
<name>@text/bindingName</name>
|
<type>binding</type>
|
||||||
<description>@text/bindingName</description>
|
<name>@text/addon.acmeweather.name</name>
|
||||||
</binding:binding>
|
<description>@text/addon.acmeweather.description</description>
|
||||||
|
</addon:addon>
|
||||||
```
|
```
|
||||||
|
|
||||||
Language file (`acmeweather_en.properties`):
|
Language file (`acmeweather_en.properties`):
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
bindingName = ACME Weather Binding
|
# add-on
|
||||||
|
|
||||||
|
addon.acmeweather.name = ACME Weather Binding
|
||||||
|
addon.acmeweather.description = Binding for ACME Weather
|
||||||
|
|
||||||
|
# thing status descriptions
|
||||||
|
|
||||||
offline.communication-error = The ACME Weather API is currently not available.
|
offline.communication-error = The ACME Weather API is currently not available.
|
||||||
```
|
```
|
||||||
|
@ -428,7 +434,12 @@ offline.communication-error=The ACME Weather API is currently not available.
|
||||||
Language file (`acmeweather_de.properties`):
|
Language file (`acmeweather_de.properties`):
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
bindingName = ACME Wetter Binding
|
# add-on
|
||||||
|
|
||||||
|
addon.acmeweather.name = ACME Wetter Binding
|
||||||
|
addon.acmeweather.description = Binding für ACME Wetter
|
||||||
|
|
||||||
|
# thing status descriptions
|
||||||
|
|
||||||
offline.communication-error = Die ACME Wetter API ist zur Zeit nicht verfügbar.
|
offline.communication-error = Die ACME Wetter API ist zur Zeit nicht verfügbar.
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in New Issue