Hi and thanks, I use this from months and is very nice.
Just a question: would it be easy to accomodate for different languages?
I just inserted the italian phrases into the file, and works, but a more universal approach would be nice.
E.g.
if hour == self.start_hour and minute == self.start_minute and hour <= 11:
prefix = "Buongiorno."
elif hour == 12 and minute == 0:
prefix = "Buom pomeriggio."
elif hour == 17 and minute == 0:
prefix = "Buonasera."
elif hour == self.end_hour and minute == self.end_minute and hour >= 20:
postfix = "Buonanotte. E dolci sogni."
hour = hour - 12 if hour > 12 else hour
if minute == 0:
time_speech = f"Sono le {hour} {ampm_str}."
else:
time_speech = f"Sono le {hour}:{minute:02d} {ampm_str}."
return prefix + " " + time_speech + " " + postfix
Hi and thanks, I use this from months and is very nice. Just a question: would it be easy to accomodate for different languages? I just inserted the italian phrases into the file, and works, but a more universal approach would be nice. E.g.
Originally posted by @ik0adr in https://github.com/UbhiTS/ad-alexatalkingclock/issues/7#issuecomment-619437550