Skip to content

Update all UI elements #511

Closed Answered by laserir
laserir asked this question in Q&A
Mar 13, 2023 · 6 comments · 6 replies
Discussion options

You must be logged in to vote

My solution now...

JSON data imported as 'data':

{
    "de": {
        "id": "de",
        "name": "Deutsch",
        "flag": "de",
        "pin_wrong": "PIN falsch",
        "panel0_title": "Willkommen",
        "active": true
    },
    "en": {
        "id": "en",
        "name": "English",
        "flag": "en",
        "pin_wrong": "PIN incorrect",
        "panel0_title": "Welcome",
        "active": true
    }
}

Select Dropdown on homepage:

language_dict = {}
for i, languages in enumerate(t.data):
    if list(t.data.values())[i]["active"] == True:
        language_dict.update({list(t.data.keys())[i] : list(t.data.values())[i]["name"]})

if settings["language_select"] == True and len(l…

Replies: 6 comments 6 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@laserir
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@falkoschindler
Comment options

@laserir
Comment options

Comment options

You must be logged in to vote
1 reply
@falkoschindler
Comment options

Answer selected by laserir
Comment options

You must be logged in to vote
2 replies
@laserir
Comment options

@falkoschindler
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants