So, I wrote this simple code:
szotar = {
'lesz': 'lessz',
'csalsz': 'csalo',
'szia': 'helo'
}
(the message is given by user (on discord)
msg = message.content.split(":")[1]
ford = len(msg.split(" "))
print(ford)
for i in range(ford):
done = msg.replace(msg.split(" ")[i], szotar[msg.split(" ")[i]])
await message.channel.send(f"Leforditott: `{done}`", reference=message)
And it works fine with 1 word, but if it type more like: lesz szia csalsz, it only translates the last word. Any ideas? Thanks.