# \[solved\](Language file) Correct syntax for properties for channel-type?

**URL:** <https://community.openhab.org/t/solved-language-file-correct-syntax-for-properties-for-channel-type/34203>\
**Category:** Misc\
**Tags:** oh2bindings, i18n, language\
**Created:** [September 14, 2017, 3:31pm UTC](https://community.openhab.org/t/solved-language-file-correct-syntax-for-properties-for-channel-type/34203 "2017-09-14T15:31:00Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![opus](https://community.openhab.org/user_avatar/community.openhab.org/opus/32/55801_2.png) [@opus](https://community.openhab.org/u/opus)\
**Post date:** [September 14, 2017, 3:31pm UTC](https://community.openhab.org/t/solved-language-file-correct-syntax-for-properties-for-channel-type/34203/1 "2017-09-14T15:31:00Z")

</div>

I have managed to get nearly all displayed labels/decriptions etc to be set in the correct language.  
However, while checking again in OH2.1 stable and OH2.2, I found that I can’t get it to use the correct label for any channel-label. I would say that it worked before, however I’m not 100% on that.

I’m using the syntax:

> channel-type.binding-name.channel-name.label = DesiredString

As said before, all other lines in .properties file are used correctly (even lines after the one above, if that matters)

---

<div class="post-metadata">

**Author:** ![cweitkamp](https://community.openhab.org/user_avatar/community.openhab.org/cweitkamp/32/56864_2.png) [@cweitkamp](https://community.openhab.org/u/cweitkamp)\
**Post date:** [September 14, 2017, 4:03pm UTC](https://community.openhab.org/t/solved-language-file-correct-syntax-for-properties-for-channel-type/34203/2 "2017-09-14T16:03:24Z")

</div>

Hey Jürgen,

you can find the syntax you should use here: [Internationalization documentation](https://www.eclipse.org/smarthome/documentation/features/internationalization.html#thing-types). Correct syntax is:

```auto
channel-type.<binding-id>.<channel-type-id>.label = DesiredString

```

Be aware the `<channel-type-id>` is not the `<channel-id>`.

---

<div class="post-metadata">

**Author:** ![opus](https://community.openhab.org/user_avatar/community.openhab.org/opus/32/55801_2.png) [@opus](https://community.openhab.org/u/opus)\
**Post date:** [September 14, 2017, 5:40pm UTC](https://community.openhab.org/t/solved-language-file-correct-syntax-for-properties-for-channel-type/34203/3 "2017-09-14T17:40:40Z")

</div>

Thanks for the Link.  
With binding-name and channel-name I tried to say the same as your channel-id and binding-id.  
My channels are all setup with channel-id=channel-type-is.  
What makes me wonder is that the channel-type-id.description is working correctly.

---

<div class="post-metadata">

**Author:** ![cweitkamp](https://community.openhab.org/user_avatar/community.openhab.org/cweitkamp/32/56864_2.png) [@cweitkamp](https://community.openhab.org/u/cweitkamp)\
**Post date:** [September 14, 2017, 6:09pm UTC](https://community.openhab.org/t/solved-language-file-correct-syntax-for-properties-for-channel-type/34203/4 "2017-09-14T18:09:35Z")

</div>

Yes, that sounds strange. Are you talking about translating your Tankerkoenig binding? Or Do you have a more specific example? Maybe a link to sources?

---

<div class="post-metadata">

**Author:** ![opus](https://community.openhab.org/user_avatar/community.openhab.org/opus/32/55801_2.png) [@opus](https://community.openhab.org/u/opus)\
**Post date:** [September 14, 2017, 6:16pm UTC](https://community.openhab.org/t/solved-language-file-correct-syntax-for-properties-for-channel-type/34203/5 "2017-09-14T18:16:23Z")

</div>

Yes, I’m talking about the Tankerkoenig binding. I found a problem in the properties file, and while checking all entries this problem occurred to me.  
It might be worth filing an Issue, let’s double check.

---

<div class="post-metadata">

**Author:** ![cweitkamp](https://community.openhab.org/user_avatar/community.openhab.org/cweitkamp/32/56864_2.png) [@cweitkamp](https://community.openhab.org/u/cweitkamp)\
**Post date:** [September 14, 2017, 6:28pm UTC](https://community.openhab.org/t/solved-language-file-correct-syntax-for-properties-for-channel-type/34203/6 "2017-09-14T18:28:06Z")

</div>

I see. I offer my help, if you like. Push your current working branch and address me in OH2 repo. I am offering to look throughout your i18n and xml files.

---

<div class="post-metadata">

**Author:** ![opus](https://community.openhab.org/user_avatar/community.openhab.org/opus/32/55801_2.png) [@opus](https://community.openhab.org/u/opus)\
**Post date:** [September 14, 2017, 6:32pm UTC](https://community.openhab.org/t/solved-language-file-correct-syntax-for-properties-for-channel-type/34203/7 "2017-09-14T18:32:34Z")

</div>

Actually this problem does exist in the published binding in oh2-addons.  
I’d like to check a changed version where the channel-id is different from the channel-type-id.  
I’ll report back.  
And Thank You for offered help.

---

<div class="post-metadata">

**Author:** ![cweitkamp](https://community.openhab.org/user_avatar/community.openhab.org/cweitkamp/32/56864_2.png) [@cweitkamp](https://community.openhab.org/u/cweitkamp)\
**Post date:** [September 14, 2017, 6:50pm UTC](https://community.openhab.org/t/solved-language-file-correct-syntax-for-properties-for-channel-type/34203/8 "2017-09-14T18:50:18Z")

</div>

You are welcome.

---

<div class="post-metadata">

**Author:** ![opus](https://community.openhab.org/user_avatar/community.openhab.org/opus/32/55801_2.png) [@opus](https://community.openhab.org/u/opus)\
**Post date:** [September 14, 2017, 7:47pm UTC](https://community.openhab.org/t/solved-language-file-correct-syntax-for-properties-for-channel-type/34203/9 "2017-09-14T19:47:06Z")

</div>

It has to be something with my binding.  
I didn’t change the IDs since the documented yahoo-weather binding does exactly the same thing (channel-id=channel-type-id) and it is working for yahoo-weather!  
.. and I found my STUPID mistake. It was a typo (what esle), instead of .tankerkoenig I had .tankerkkoenig!  
I didn’t spot the problem earlier since most of the channels have the same label in both language versions (Diesel, E10 and E5).  
I’m sorry for the hussle

Why is it that you do find your own mistakes only after you post a question?

---

<div class="post-metadata">

**Author:** ![cweitkamp](https://community.openhab.org/user_avatar/community.openhab.org/cweitkamp/32/56864_2.png) [@cweitkamp](https://community.openhab.org/u/cweitkamp)\
**Post date:** [September 15, 2017, 7:19am UTC](https://community.openhab.org/t/solved-language-file-correct-syntax-for-properties-for-channel-type/34203/10 "2017-09-15T07:19:19Z")

</div>

As I said. No problem. If you need more help, don’t hesitate to ask.

> Why is it that you do find your own mistakes only after you post a question?

Hahaha, I know that. It obviously has something to do with that you got more sensitive towards your own code after posting or even committing something. I always tell my developer colleagues to double check their code and after that commit or ask if they got stuck with anything. They shouldn’t spent to much time with rereading their lines of code because after a while you got blind for things others will see immediately.

---

<div class="post-metadata">

**Author:** ![opus](https://community.openhab.org/user_avatar/community.openhab.org/opus/32/55801_2.png) [@opus](https://community.openhab.org/u/opus)\
**Post date:** [September 15, 2017, 3:17pm UTC](https://community.openhab.org/t/solved-language-file-correct-syntax-for-properties-for-channel-type/34203/11 "2017-09-15T15:17:38Z")

</div>

I’ve pushed the changes on Github.
