Autor Thema: Internationalization  (Gelesen 1795 mal)

Offline gvzdus

  • Developer
  • Sr. Member
  • ****
  • Beiträge: 873
Internationalization
« am: 12 April 2021, 22:34:40 »
Let's write in English in this thread. Already 2 persons raised an interest in making FHEM App international.

What would be a lean approach for this? Very basic idea:

IMHO this should be simple. Is your impression this requires more than:
  • "Bereiche" etc. (in App.vue)
  • all the templates with "geschlossen" / "geöffnet"

...
Do you think it would take more than having a simple language / template replacer? E.g., from public/cfg/templ_shutter.json, changing:
      "text": ["motor:up:öffnet...","motor:down:schließt...","pct:1:offen","pct::geschlossen"],
to
      "text": ["motor:up:$OPENING$","motor:down:CLOSING","pct:1:$OPEN$","pct::$CLOSED$"],
and a "de.json" language file:
{ "OPENING": "öffnet...", "CLOSING":"schließt ...", "OPEN": "offen", "CLOSED": "geschlossen" }
etc. ?
« Letzte Änderung: 07 Mai 2021, 13:38:31 von jemu75 »

Offline gvzdus

  • Developer
  • Sr. Member
  • ****
  • Beiträge: 873
Antw:FHEM App - Internationalization
« Antwort #1 am: 12 April 2021, 23:09:38 »

Offline jemu75

  • Moderator
  • Sr. Member
  • ***
  • Beiträge: 707
    • FHEM App
Antw:FHEM App - Internationalization
« Antwort #2 am: 12 April 2021, 23:45:59 »
Other option: A systematic approach, like:
https://www.codeandweb.com/babeledit/tutorials/how-to-translate-your-vue-app-with-vue-i18n

I think, this is the right way and easy to implement in FHEM App. Now I need a bit time to build a solution.  ;)

Offline moustic999

  • Jr. Member
  • **
  • Beiträge: 63
Antw:FHEM App - Internationalization
« Antwort #3 am: 13 April 2021, 08:08:12 »
Other option: A systematic approach, like:
https://www.codeandweb.com/babeledit/tutorials/how-to-translate-your-vue-app-with-vue-i18n

I think this is the best solution.

I think, this is the right way and easy to implement in FHEM App. Now I need a bit time to build a solution.  ;)

I will prepare most obvious translation already.

Offline jemu75

  • Moderator
  • Sr. Member
  • ***
  • Beiträge: 707
    • FHEM App
Antw:FHEM App - Internationalization
« Antwort #4 am: 13 April 2021, 08:33:08 »
I think this is the best solution.

I will prepare most obvious translation already.

thanks for your support  :)
On the next step i check the possible sources of content at the application.
I think mainly we have three sources
1)  fhem self -> e.g. Attributes like "room", "group", "alias" or special formatted values from readings
2) the Application self -> e.g. Navigation Items like "Räume", "Gruppen", "System", "Home"
3) the Template Definitions -> e.g. Elements like text, text2 on the main-part or the text-items on the info-part

May be the third point could be a bit difficult, because the solution should be generic. But i think, it is possible to find a good way to solve this :)

Offline moustic999

  • Jr. Member
  • **
  • Beiträge: 63
Antw:FHEM App - Internationalization
« Antwort #5 am: 13 April 2021, 14:35:31 »

2) the Application self -> e.g. Navigation Items like "Räume", "Gruppen", "System", "Home"


This is the most critical and top priority on my list.
Gefällt mir Gefällt mir x 1 Liste anzeigen

Offline jemu75

  • Moderator
  • Sr. Member
  • ***
  • Beiträge: 707
    • FHEM App
Antw:FHEM App - Internationalization
« Antwort #6 am: 16 April 2021, 14:36:39 »
Hi guys, with the new release (v3.12.0) i have implemented the i18N Plugin. Now you can use FHEMApp as "multilanguage-App" :) At the first Step you can choose between english and german language. But it's not a problem to implement other languages. We only have to fill the "translation-file". At the second step i also include the "multilanguage-function" in user defined templates. Please test the new feature and give me feedback :)

Offline moustic999

  • Jr. Member
  • **
  • Beiträge: 63
Antw:Internationalization
« Antwort #7 am: 18 Oktober 2021, 20:50:43 »
Sorry for so late feedback, but translation of the menu works fine; I have it in english.

The biggest missing point is translation for template, for instance light is stick to "aus" "an", havind translation for this would be great !


Offline jemu75

  • Moderator
  • Sr. Member
  • ***
  • Beiträge: 707
    • FHEM App
Antw:Internationalization
« Antwort #8 am: 18 Oktober 2021, 21:01:46 »
Sorry for so late feedback, but translation of the menu works fine; I have it in english.

The biggest missing point is translation for template, for instance light is stick to "aus" "an", havind translation for this would be great !

The translation within the templates is not yet implemented. But you can easily customize each template. You can find them in the "cfg" directory.

Offline moustic999

  • Jr. Member
  • **
  • Beiträge: 63
Antw:Internationalization
« Antwort #9 am: 19 Oktober 2021, 19:58:36 »
The translation within the templates is not yet implemented. But you can easily customize each template. You can find them in the "cfg" directory.

that's what I made, and it works fine by changing in template

 

decade-submarginal