OpenHAB2 thing definitions in several languages

translation
openhab2
development
Tags: #<Tag:0x00007f6ce6960078> #<Tag:0x00007f6ce6957e78> #<Tag:0x00007f6ce6957ae0>

(Oliver Kuhl) #1

Hi,

I am doing my first steps with OH2 and wonder, if there is a way to provide thing definitions in multiple languages, e.g. german and english.

Background: RWE Smarthome is typically a german product and german would be the prefered language here. However, OpenHAB is an international product and english is also necessary in my opinion.

So what to do?

Best
Ollie


(Chris Jackson) #2

Yes - OH2 supports language files. I can't find the documentation at the moment, but if you look in the source for the org.eclipse.smarthome.config.xml.test bundle, you'll see the files in the i18n folder. They have the following format -:

config.config.Dummy.location.label = Ort

I'm sure this is documented somewhere, but I can't find it, but it's also reasonably easy to work out...


(Oliver Kuhl) #3

Ok, great! Got it, thanks. I'll try that later today...


(Nilton Cezar) #4

Hello Chris

I'm also trying to collaborate with a Portuguese translation, but I did not find the file you mentioned. Could help?


(Martin Herbst) #5

Add-ons can use different languages for the displayed texts. The files with the texts have to be stored in ESH-INF/i18n. You can see an example in the Yahoo Weather binding.

You can find the documentation here: https://www.eclipse.org/smarthome/documentation/features/internationalization.html

Unfortunately not all add-ons fully support the definition of different languages.


(Chris Jackson) #6

Which binding are you talking about? The i18 files are in each binding project folder.


(Nilton Cezar) #7

Ok, thank you Martin.
But I would like to translate openhab's menu and screens. Ex: Configuration => Configuração (Portuguese), or Preferences => Preferências (Portuguese), or Background => Fundo (Portuguese). Is it possible to make this change?


(Chris Jackson) #8

I suspect you are now talking about PaperUI - this is something different again...

The main UI is handled by each UI (PaperUI, HABmin, HABPanel, BasicUI etc...). The bindings 'only' provide text for the thing names, configuration parameters etc that are associated with configuration - not the menus etc.


(Nilton Cezar) #9

Exactly Chris:

I want to translate the screens of the HabPanel UI (configuration screens). It's possible ?


(Hervé Fache) #10

Hello @nilton, did you manage to do what you wanted? I am still using OH1.8 and creating several sitemaps for the different languages I support, but it’s not ideal, especially as the Text sitemap item does not support mappings…