Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import re
- translation_table = {‚En blanco‘:’In weiß‘,
- ‚En negro‘:’schwarz‘,
- ‚NARIZ‘:’Nase‘,
- ‚Brazos‘:’Arme‘,
- ‚BRAZOS‘:’Arme‘,
- ‚pe‘:’Stäbchen‘,
- ‚PIERNAS‘:’Beine‘,
- ‚pe‘:’Stäbchen‘,
- ‚Anillo mágico de‘:’Fadenring‘,
- ‚pb‘:’fM‘,
- ‚ronda‘:’Runde‘,
- ‚au‘:’zun‘,
- ‚mv‘:’halbes Stäbchen‘,
- ‚in next st‘:’in die nächsten Maschen‘,
- ‚in next 2 st‘:’in 2 Maschen‘,
- ‚in next 8 st‘:’in die nächsten 8 Maschen‘,
- ‚dis‘:’abn‘,
- ‚6 sc in magic ring‘:’6 fM in den Fadenring‘,
- ‚in the next‘:’in die nächsten‘,
- ’sl st‘ :’KM‘,
- ‚in all‘ : ‚in Alle‘,
- ’st‘:’Masche‘,
- ‚in next‘:’in die nächsten‘,
- ‚repeat 3 times‘:’3x wiederholen‘,
- ‚repeat 4 times‘ : ‚4x wiederholen‘,
- ‚repeat 2 times‘ : ‚2x wiederholen‘,
- ‚fM in all 18 st‘:’fM in alle 61 Maschen‘,
- ‚CABEZA‘:’Kopf‘,
- ‚V1′:’Runde 1‘,
- ‚V2′:’Runde 2‘,
- ‚V3′:’Runde 3‘,
- ‚V4′:’Runde 4‘,
- ‚V5′:’Runde 5‘,
- ‚V6′:’Runde 6‘,
- ‚V7′:’Runde 7‘,
- ‚V8′:’Runde 8‘,
- ‚V9′:’Runde 9‘,
- ‚V10′:’Runde 10‘,
- ‚V11′:’Runde 11‘,
- ‚V12′:’Runde 12‘,
- ‚V13′:’Runde 13‘,
- ‚V14′:’Runde 14‘,
- ‚V15′:’Runde 15‘,
- ‚V16′:’Runde 16‘,
- ‚V17′:’Runde 17‘,
- ‚V18′:’Runde 18‘,
- ‚V19′:’Runde 19‘,
- ‚V20′:’Runde 20‘,
- ‚V21′:’Runde 21‘,
- ‚V22′:’Runde 22‘,
- ‚anillo magico de‘:’Fadenring‘,
- ‚vuelta‘:’wenden‘,
- ‚cad‘:’Luftmasche‘,
- ’nariz‘:’Nase‘,
- ‚PIERNAS‘:’Beine‘}
- pattern = re.compile(r’\b(‚ + ‚|‘.join(translation_table.keys()) +r‘)\b‘)
- result = pattern.sub(lambda x : translation_table[x.group()], Anleitungstext)
- print(result)
- # CODE tkinter
- from tkinter import *
- def buttonClick1():
- print(„Es wurde Englisch ausgewählt“)
- def buttonClick2():
- print („Es wurde Russisch ausgewählt“)
- Fenster=Tk()
- Anzeige=Label(Fenster, text=“Hallo“)
- Anzeige.pack()
- print („Bitte wählen Sie die Sprache“)
- Button1=Button (Fenster, text=“Englisch“ , command=buttonClick1())
- Button2=Button (Fenster, text=“Russisch“,command=buttonClick2() )
- Button1.pack()
- Button2.pack()
- Fenster.mainloop()
- Sprache=“Englisch“
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement