Git Product home page Git Product logo

Comments (4)

rosskouk avatar rosskouk commented on May 25, 2024

Hi,

Thanks for the request. It should be reasonably easy to add localisation, effectively the now hard coded strings would be replaced with variables which would reference a localisation file. That file would set the speech related strings based on the localisation set in the config.

Users would still need to manually set up the locale on their echo devices and the skill on the Amazon side. I suspect that the same setup could also disable speech altogether, I wouldn't recommend that though as it is good for troubleshooting.

If you're interested in helping with translation let me know, which languages are you interested in? Also happy to look at a pull request if you want to have a go at it too.

from asknavidrome.

sonntam avatar sonntam commented on May 25, 2024

@rosskouk You are right. It shouldn't be that difficult albeit non-trivial. I read a bit about Python and internationalization (= i18n) and it seems Python supports this natively via the gettext module. There are also some nicely written tutorials e.g. this one I found via Google. Unfortunately, in a quick search I couldn't find many major apps written in Python using this. Some examples are

  • Gajim, a XMPP messaging client
  • Django, a web framework

The downside is that a whole toolchain consisting of multiple tools is necessary to create and maintain translations, i.e. pygettext, msgfmt, msgmerge. This would make some kind of build script necessary to have. I'm not quite sure what the best practice here would be. Django is using a build script in Python for that.

I personally am in need of a German translation and will of course provide one with pleasure. The Alexa Skill config JSON I already translated to German (using ChatGPT and some manual clean-up).

If the above approach using gettext appeals to you I'd like to try to contribute. For this I setup a fork with a devel_i18n branch. Along the way I'd document what steps were necessary.

Please let me know your thoughts on this. Thank you!

from asknavidrome.

rosskouk avatar rosskouk commented on May 25, 2024

Hey @sonntam,

That sounds great, happy to include your pull request once it's ready.

from asknavidrome.

andresponte avatar andresponte commented on May 25, 2024

Hi @sonntam, I could also help with the translations to Spanish and Portuguese.

from asknavidrome.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.