Translate to non-english letters
tsi - April 17, 2009 - 23:47
| Project: | Comment Count Image |
| Version: | 6.x-1.1 |
| Component: | Miscellaneous |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
Couldn't get the images to show hebrew letters correctly.
Is it possible ?
The hebrew should show : תגובות (= Comments)

#1
I would guess that the built-in standard font - which the module uses - doesn't ship with these characters. (Sorry!) The obvious solution would be to enable different fonts to be used... the CAPTCHA module (in particular, Image CAPTCHA) features such a mechanism, I guess it could be ported from there. Not sure if I'm motivated to work on that though, with a lot of other stuff on the plate that is more important to me.
I'll be happy to take patches, though :)
#2
This shouldn't be a fancy 'use any font in the world' feature but it should use a standatrd web-safe font that will support any character,
I understand this is not about just defining a new font in the code because if it was I would do it myself.
Drupal go such a long way to support multi language and RTL so I hope the this module will follow soon.
Thank you, great module - just for the record - I'll be using it anyway :-)
#3
The problem is that, as far as I'm aware, PHP only ships with a small set of (obviously not web-safe) bitmap fonts, and the server can't rely on any others to exist.. don't know if PHP is even able to load system fonts in a cross-platform way. So while the client has lots of nice fonts to choose from, the server needs to load any additional fonts from .ttf files or stuff. And I can't use the client fonts because it must be painted onto a picture long before the client even gets to see it... although...
The "Comments:" text doesn't actually change, does it? We could include an option to render only the count number (which should really be multilanguage-safe in most cases) and include the "Comments:" text as regular HTML text in the feed. Or drop the option and make it the default altogether, don't know. Anyways, although we couldn't guarantee "Comments:" and number text to match in size, that would make it work from the i18n point of view.
Unfortunately, I still lack the time to take care of this... if anyone wants to help out, here's your chance to contribute!
#4
Thanks for the quick response,
Sorry to add an obstacle, but in hebrew (and arabic and maybe others) we use right to left so its not only a font issue but also the order of things. in other words - the string in hebrew will be '1 : Comments' or 'תגובות : 1' and not 'Comments : 1' , but I don't think this should be a problem, is it ?
#5
Nope, no problem, as long as Drupal's translation function is properly used this will come for free.