Skip to content
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

Support for more languages by using babel #2

Open
GoogleCodeExporter opened this issue Mar 15, 2015 · 2 comments
Open

Support for more languages by using babel #2

GoogleCodeExporter opened this issue Mar 15, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

I have made a branch where I implemented support for using the external library 
babel to translate months and weekday names. This gives support for many 
locales (something like 650) in one go.
Would you be interested in merging it? 
If so I will do a clean-up to solve some problems that the patch currently have:
* pdfs in Arabic, Chinese and some other languages have missing characters 
(most likely a font problem).
* the week_of_year_prefix is currently missing (should be possible to extract 
from the date formatting functions).

Link to the code: https://code.google.com/r/jens-babel/source/browse/
Link to babel: http://babel.pocoo.org/

Original issue reported on code.google.com by j...@persson.cx on 12 Jan 2015 at 7:39

@GoogleCodeExporter
Copy link
Author

A few notes on backward comparability

* I reused the -l as short option, but the language name changed to lower-case 
(ie. '-l de' instead of '-l DE')
* meanwhile --lang is changed to --locale
* --list-langs changed to --list-locales (and is very long)
* The --lang-var option is removed

Original comment by j...@persson.cx on 13 Jan 2015 at 6:48

@GoogleCodeExporter
Copy link
Author

Very cool idea (and maybe more pythonic). Haven't used python babel before but 
looks promising. Go ahead and clean it up, I will merge it. Don't care about 
backward compatibility, callirhoe adoption is still low, we don't mind if sth 
breaks :)

Regarding Arabic and some other right-to-left languages... do you think it will 
be as simple as rendering a (reverse) unicode string with the existing (cairo) 
left-to-right routines? (and possibly applying right-alignment)

Original comment by geortz on 13 Jan 2015 at 7:50

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant