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.
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…
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.
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?
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.
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…