-
Notifications
You must be signed in to change notification settings - Fork 60
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
Arabic language support #154
Comments
The language support is quite primitive. Adding support for a new language, is done by creating a new dictionary with mappings between English and the target language. There are around 30 strings that need translation. Additionally, locale and latex-language (used by babel) should be specified. doconce/lib/doconce/doconce.py Lines 26 to 63 in f0a317e
Remember to use unicode literals, e.g. You could provide the translation in a reply here or in a pull request. Feel free to ask if anything is unclear. |
this is the mapping from English to Arabic. I do not know how to map 'locale', could you please help
|
locale is used for formatting the date with If I run the following test program, I get (reversed when copying)
which seems reasonable (according to Google translate).
I'm not sure how well LaTeX works with right-to-left languages like Arabic (babel might do some magic), but other formats will treat it as a left-to-right language with left-adjustment. I will add Arabic support soon, so that you can try it out. |
thank you, it looks good. I hope this works with no further modifications. I am not familiar with how latex works, but according to this link |
Just pushed an update now. If you try installing DocOnce from the git repo with pip, you should be able to test it. We have a test file which uses all constructs requiring translation: You can test it with
Note that most of the document (i.e. everything which is explicitly written) will still be in English. I suspect the right-to-left packages we would need to include, would create problems with other packages, and require more substantial changes to how we generate LaTeX. |
I created a new file with name Arabic.do.txt ( attached) . I tried to generate the document on Windows using WSL https://docs.microsoft.com/en-us/windows/wsl/install-win10 , but i get an error messege which tells me that Arabic is not added. I dont know what is the problem. It could be the WSL, unfortunately, Now I have only my Windows machine, I will try it on linux or mac OS as soon as i have my macbook fixed |
You would need to do I managed to get |
I tried and I still get an error. Could you please show me the result |
Yes, I just pushed the generated HTML. (I found some bugs while generating the LaTeX and Sphinx documents, so they're not up yet.) |
it looks great ... but there two things which needs to be fixed
how can these problems be solved ? |
The English words in the HTML are all from the source document. (except box in the header for bbox). Right-adjusted text is a bit tricky, since the templates we use are all made for left-to-right languages. Full Arabic support for all formats would require a tremendous amount of work, so I will not pursue this any further at this time. |
hi,
I would like to thank you for maintaining this great tool. I started using and experimenting with doconce for a while and I believe this is best documenting tool I have ever used.
I would like to contribute to this project by adding Arabic language. however, I do not know what I need to do to make doconce support Arabic .
Could you please help me
thank you
The text was updated successfully, but these errors were encountered: