localizeable theme graphics ???

0 views
Skip to first unread message

helpy (Guido Erlinger)

unread,
Aug 22, 2009, 3:51:15 AM8/22/09
to habar...@googlegroups.com
Hello,

Themes, which are propperly prepared with gettext functions _t(),
_n(), _e() and _ne() can be translated by creating following
directories in the theme directory:

==> <theme-name>/locale/<language code>/LC_MESSAGES

And than create the language catalog (mo file) and save it as
theme-name.mo int the new LC_MESSAGES directory


The charcoal theme has graphics with english texts!
Wouldn't it a nice way for localizable graphics to put the localized
graphis in a new direcotry:

==> <theme-name>/locale/<language code>/images

And if there is an image in the locale directory for the appropriate
language, this one can be used instead of the image in
<theme-name>/images.

This kind of localization could be used for each file-type. A theme
function like _f( 'images/graphic_01.png' ) could return
'locale/<language code>/images/graphic_01.png' ....

What do you think about this idea?
If you deliver a theme (charcoal) with habari, which uses graphics
with english texts ... these should also be localizeable, like the
texts in the theme itself!

cu, helpy

msi

unread,
Aug 23, 2009, 1:33:08 PM8/23/09
to habari-dev
Charcoal is ready to "translate" the images. But not the way, you
think of. Charcoal will use your locale variable (for example: de-de)
and it will look for a CSS file named after that variable (de-de.css),
located in the same directory as Charcoal. This CSS file will be
loaded in "header.php" and can contain your images (with translated
text) and other sizes (if necessary).

helpy (Guido Erlinger)

unread,
Aug 23, 2009, 3:40:32 PM8/23/09
to habar...@googlegroups.com
Hi msi,

cool! thank you for this information! This works great :-)
I did this on www.helpy.de ...

created de.css and an new direcotry images.de with the translated
images.

thank you!!!
guido

Reply all
Reply to author
Forward
0 new messages