-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding the currency Name #12
Comments
Yeah, that seems be good idea. I guess for translation, it could be 2 options, either using .po files using Feel free to make a pull request ;) |
I will try to make a pull request in the next few days, I will look at gettext, as it seems to be the "correct" way |
While working with I've heard good things about http://babel.pocoo.org/en/latest/index.html but have not used it myself and not sure for such small lib as python-currencies, it would be a good option or an overkill. Many projects I've seen, the build simple wrappers around Since python-currencies is pretty small, I don't think there would be a need for full fledges text extraction features and other fancy stuff comes out of the Babel. Worth noting, I think by making some small functions around gettext it should get the the job done without having to install other dependencies. I myself don't have the experience with Python i18n out of Django, Flask and some others since they have all the tools and utilities included. I did some quick searches and skimmed through several articles and so far I found https://simpleit.rocks/python/how-to-translate-a-python-project-with-gettext-the-easy-way/ to be the good start with clear explanations. |
Hiya guys, I agreed with all the above, but for starters I think a nice and simple translation to English (done via a JSON file) will suffice - at least to get basic functionality. This can then later be extended for other languages/alternative names I'm part way through creating the JSON file (too short of a job to automate, but still tedious). I'll create a fork and wire up the .get_name() method in the main class after as well. Example of the JSON file so far: { Any tips/advice are welcome :) |
It would be really great if the library would know the full name of the currency. For example:
or
I think english names would be a good starting point, but I think there should be a way to translate the names? I thought of JSON files for each language that contains the name for each currency. The library could then choose the correct file automatically.
The text was updated successfully, but these errors were encountered: