I have found a great plugin for WordPress: Language Switcher.
Just one issue so far: NextGEN Gallery widget does not allow to edit its title to switch between languages.
Well, and it’s nesessary to edit theme files — replace „smth” with __(‘smth”), and «correct» language file (<lang>.po
, and converting to .mo with command msgfmt <lang>.po -o <lang>.mo
).
could you explain your modifications in more detail?
Yes, i’ll try :-)
1. NGGallery is great. To display its widget title in different languages you simply need to have you specific title translated in WP’s “global” .mo file (is it clear? my english is poor, sorry) — and find in nggwidget.php line like
echo $before_widget . $before_title . $options[$number][‘title’] . $after_title;
and replace it with:
echo $before_widget . $before_title . __($options[$number][‘title’]) . $after_title;
2. You theme files often may be “untranslated” — they often contain english names for titles etc. To have them translated, you need replace every displayed “word” with (or _e(‘word’) in place of __(‘word’) — depending of ‘word’ is printed on screen or used in variables to be printed later).
3. Sometimes (as with NextGen Gallery) you need to add some word to you language’s .po file (uk.po, or uk_UA.po for Ukrainian) and then convert this .po to .mo (every software with gettext support looks into .mo files for translated messages)
Topic 2 covered great at Language Switcher Home.