Translations in HabPanel

Hey guys,

I could need some help/input how things are working in HabPanel…

this is my code of the astro.items

String			MoonPhase		"Mond Phase [%s]"					{ channel="astro:moon:home:phase#name" }
Number:Length	MoonDistance	"Mond Entfernung [%.1f %unit%]"		{ channel="astro:moon:home:distance#distance" }

and i have 2 different translations… in PaperUI it is in german… what i also like to have in Habpanel… but actually its in english there…

this is my code in the Habpanel widget…

		<div class="widget">
			<div class="icon off"><svg viewBox="0 0 48 48"><use xlink:href="/static/matrix-theme/squidink.svg#globe"></use></svg></div>
			<div class="name">Mond Phase</div>
			<div class="valueGroup"><div class="value">{{itemValue('MoonPhase')}}</div></div>
		</div>
		<div class="widget">
			<div class="icon off"><svg viewBox="0 0 48 48"><use xlink:href="/static/matrix-theme/squidink.svg#half-moon"></use></svg></div>
			<div class="name">Entfernung zum Mond</div>
      <div class="valueGroup"><div class="value">{{itemValue('MoonDistance')}}</div></div>
		</div>

habpanel1 habpanel2

I have exactly the same question. Can anyone give a hint, how to deal with this? thx!

I used a map-transformation in my items to get the translated string in HabPanel.

1 Like