openHAB seems to support Hebrew nicely.
However, the web page is rendered from the sitemap in English direction - Left To Right (LTR); while in Hebrew (and Arabic) the page should be rendered from Right To Left (RTL).
This can be acheived by simply adding
I think that Sitemaps should have some direction configuration.
Until it’s implemented, is there a way that I can ‘inject’ the
dir directive myself?
Anyone has any input on this?
Maybe @Kai ?
Sorry, I never looked into this so far.
Would that be needed to be built in the different UIs? Does the sitemap need to have a direction flag in order to tell the UIs how to render it? Or can UIs derive this from some language setting automatically?
Well, I’m not familiar enough with the different UIs, so maybe I’m making some stupid mistake here
Direction can be derived from language - but how the UI knows what is the language?
If I understand correctly, having the ‘direction’ built in the UI might annoy many users. An English sitemap, that got automatically rendered as-if it was Hebrew is very annoying to look at.
Here’s an example, of your text ;), with the wrong direction:
Just because my device is usually in Hebrew (or Arabic) doesn’t mean that I want to have everything rendered from Right to Left - only the Hebrew text…
Therefore, I think it’d be best to have it as a property of the Sitemap, and allow creating an English sitemap with LTR text, and another Hebrew Sitemap, with RTL - no matter what’s the default language my device is usually using.
An interesting question, which is up to you to decide, is whether to add a
direction property (that will be translated to HTML’s
dir), or to add a
language property to the sitemap (which will automatically set appropriate
For the current problem, having
direction is enough, and there is no specific added value in
language that I’m aware of now; however, life are full of surprises, and maybe in the future a
language will be useful.
Either way, as far as I understand, there is no need to have both of them.
Does anyone have new insights/workarounds for this?
As a workaround, I used the CSS theming method with
direction: rtl; /* Right to Left */