skriker

Polyglot

author - malyfred / 2005-02-22 /
  • česky

Example

In a Rhodes tailor shop:
Order your summers suit. Because is big rush we will execute customers in strict rotation.

A sign posted in Germany's Black forest:
It is strictly forbidden on our black forest camping site that people of different sex, for instance, men and women, live together in one tent unless they are married with each other for that purpose.

This post is here to introduce the plugin called "Polyglot" – plugin for complete and easy localization of your blog into several languages. Polyglot is based on Language Picker. If you have any problem reading documentation of Language Picker can be helpful. I have developed it for my private use but some other guys/gals could be interested (hello Mihailo:o) as well.

I have fixed all bugs in Language Picker that I've found and added ability to automatically detect the visitor's preferred language and then choose the right translation for him/her. You can try it here – with this post. Example above should be in czech or english according to your selection or preferred language in your browser.

How it works

For example this post actually looks like this:


[lang_cs]Dva studenti…[/lang_cs]

[lang_en]In a Rhodes tailor shop…[/lang_en]

This post is here to…

And that's it. You can translate titles of the posts, pages, names of the categories etc. in the same way.

ISO codes

You are supposed to use [lang_xx] where 'xx' is the ISO code of the language. These can be found here: ISO codes

Language versions

If you put to your index.php (and single.php, search.php etc.) in your themes something like this:

<?php if(function_exists('polyglot_other_langs')) {
//display existing language versions of the post
polyglot_other_langs(' ','<ul>', '</ul>', '<li>', '</li>');
}?>

(must be inside of the WordPress loop) you allow your visitors to choose the language version of particular post (as could be seen above).

Flags

Name of the language or associated flag will be shown according to the value of $polyglot_settings['use_flags']. (Thx Mateusz Łoskot for inspiration)

Preferred language

Then you can offer your visitors to set preferred language for entire blog (as you see in my menu). It can be done by code like this:


if(function_exists('polyglot_list_langs')){
polyglot_list_langs(false);
}

that you put e.g. in your sidebar.php. Function polyglot_list_langs() accepts one optional parameter true or false that says whether names of languages or flags should be shown.

RSS

You can also offer RSS feeds in different languages:

<a href="<?php bloginfo('url'); ?>?feed=rss2&lang_view=en"> English RSS</a>

Last thing you have to do is to specify languages of your blog in polyglot.php. Basically – you just add ISO codes to the array $polyglot_settings['knownlangs'].

If there is no suitable language version of text present – then the default language version is selected. If even default language version is not there – then only parts that are not translated are shown.

Template localization

Because Polyglot changes dynamically prefered language of your blog – you don't have to do anything special to translate your blog except that everything in your templates that should be translated must be "gettexed". And appropriate .mo files must be in your wp-includes/languages directory. You can get them here: WP localization files and they should be renamed to xx.mo where 'xx' is the ISO code of certain language.

Time & Date

Time and date formats can be cusomized to fit the language traditions since the versin 0.8.

Permalinks

Permalinks are fully supported, and turned on by default, since version 2.0 was released

Comments

The version 0.8 has also introduced the ability to write comments on posts in more language versions. Your visitors must use [lang_xx] instead of <lang_xx>.

Other useful plugins

You can also try some other of my plugins: IImage Browser, IImage Gallery, IImage Panorama, JÄÅ Preview.

Known issues

  • You have to set WPLANG (e.g. define('WPLANG', 'en');) in your wp-config.php. Thank you Pete!
  • If you are using WP older than 1.5 – uncomment part of the code from line 125 and comment part from line 139.

Important

Since version 0.8 you can use [lang_xx] instead of <lang_xx>. That's useful for those using WYSIWYG editors.

Fixes

01.04.2008 – WP 2.5 compatibility improved
27.01.2008 – WP 2.3 compatibility improved (tags, links, initialization,…)
11.10.2007 – few RSS related filters added
27.05.2007 – some setcookie improvements
22.05.2007 – small improvements related to new features in WP2.2
29.01.2007 – version 2.0 released. Many new features and improvements added (permalinks among others).
24.03.2006 – original WP function trailingslashit doesn't work as intended so it has been replaced by polyglot_trailingslashit
20.01.2006 extended polyglot_the_date, now accepts $before & $after
extended polyglot_list_langs, now sets a class for the <li>s (language_item and current_language_item)
Thanks Jan for all these improvements!
07.01.2006 Tag [lang_xx] added
18.10.2005 Huge update – flags added, 'translate categories' plugin implemented etc.
25.5.2005 Polyglot is now using standard load_default_textdomain() function.
13.3.2005 Tag <lang_all> is since this moment optional – everything except translated parts is handled as <lang_all>
12.3.2005 Fixed problem with WP1.5 – thanks Matthias.

Download

polyglot2.5.zip.

default_gettext.zip – fully gettexed default theme. (thanks to Maira)

Let me know

I'd appreciate if you let me know that you use Polyglot on your web. You can also choose whether you want to be informed about new versions:

How to translate categories

There are two ways. At first you can write translations directly to the category 'name' using [lang_??] tags. But WordPress is limiting the name length to just 55 characters so you will have a problem to fit all translations inside. I'd recommend you increasing the length of 'name' column in 'items' table (WP <2.3 – 'cat_name' column in 'categories' table) in your WP database.

Second way is to add all translations of categories to your .mo files and Polyglot will try to translate them. It's tested with wp_list_cats() function.

  1. Mihailo 2005-02-22 / 3.10 am

    Yay!!! I also wish this something like this becomes part of the core. I’d also like to see it more advanced, so that instead of using lang tags, each article article and/or category would have separate language field, and selected for displaying based on that.

    Till then, I’m off to play with Polyglot :) Thanks!

  2. Jason 2005-02-22 / 11.36 pm

    I’ll have to take a look when I get some time… I’m glad somebody’s working on stuff like this; I wish I had the time to continue with it myself…

  3. Yves 2005-02-27 / 11.23 pm

    Nice work! Works like a charm. One problem though with the “previous post” and “next post” links that displays the titles of the preceding and following post in the single.php view. It show the titles for all languages , one next to the other. Any workaround? What about a mini “the loop” just for this navigation part?

  4. malyfred 2005-02-28 / 1.33 am

    >Yves It should be possible just to add proper hook for this in polyglot.php. If you could not find the right one I would suggest to call the lang_picker_respect_more("your text") function on this. Where you replace “your text” with whatever should be “polygloted”.

  5. Yves 2005-03-02 / 12.50 am

    Well, after much head scratching and Plugin API documentation reading I saw the light (I am a newbie PHP meddler) and added
    add_filter('next_post', 'lang_picker_respect_more',1);
    add_filter('previous_post', lang_picker_respect_more',1);
    to polyglot.php but with no effect.
    These functions however are not referred to as available filter hooks in the Codex but I don’t quite know what I am missing.

    Oh and on another note, Would you know where to find a gettexed version of the Kubrick theme?

  6. malyfred 2005-03-02 / 3.12 am

    >Yves These hooks seem to be good for it and if it doesn’t work – we have to “dig deeper” in the code…:o( Gettexed Kubrick should be soon on official WP web. As far as I know – they are working on it. Look into archive of wp-polyglots mail list: wp-polyglots.

  7. Yves 2005-03-02 / 8.33 pm

    Thank you for your reply. I may settle for more conventionnal “next post/previous post” links in the meantime.
    I did find a hint that fully gettexed themes might not be feasible until version 1.5.1 .I decided for the short term to use the theme-switcher plugin to switch between two hard translated theme, now the challenge is to have the same link switch the theme and the language of the post and the locale! An hybrid between polyglot and theme-switcher?

  8. malyfred 2005-03-02 / 10.29 pm

    >Yves Actually it shouldn’t be so hard. Just let the Polyglot do its work and change the themeswitcher to respect selected language. It could be like 4 lines of code!

  9. neingeist 2005-03-14 / 9.12 pm

    TrackBack: neingeist » The Tower of Babylon

  10. freshlabs - Wordpress multilanguage 2005-03-15 / 12.13 pm

    [...] rschiedene Ansprüche. Bislang habe ich zwei davon ausprobiert: Polyglot (Autor URI: http://fredfred.net/skriker/index.php/polyglot) Polyglot erlaubt es, die Sprache in einem Post mi [...]

  11. joe 2005-03-20 / 5.25 pm

    How did you manage to change the menu titles also? I attempted to specify the variations in the code in the same way as you would for making a multi-language post, but no luck… is it something to do with the mo files? they didnt seem very editor friendly! I hope you don’t mind me asking… :>

  12. malyfred 2005-03-20 / 5.36 pm

    >joe At first you have to “gettexed” your templates – so for example in sidebar.php you need something like this:
    _e('Categories') instead of just ‘Categories’.
    Then you have to download .po file of your tranlation and add the tranlations of all string that are not in the default WP version. Then use poEdit to generate your own .mo file. And that’s it. If you want to translate categories as well – let me know – I can release plugin that I am using for that purpose.

  13. IImage Browser | skriker 2005-03-21 / 5.38 am

    [...] one for you if you like 360° panoramas. If you would like to have multilingual blog – try Polyglot. Download: iimage-browser.1.4.2.zip iimage-browser.1.4.3.zip – beta – IImage Browser butt [...]

  14. IImage Gallery | skriker 2005-03-22 / 1.18 pm

    [...] rowser for adding images to you galleries and IImage Panorama if you like 360° panoramas! Polyglot is for those who would like to have their blog or posts in more languages. Download: iima [...]

  15. Sean 2005-03-23 / 2.37 pm

    Hi Malyfred,

    I just love your plugins. Use your image plugins on http://www.seansite.net and will try out your language plugin on http://www.bandung.seansite.net.

    But got some issues when it comes to your language plugin which I hope you can help me with (tried the address to Language Picker as mentioned in your post, but I can’t get it to work):

    1. How did you get the language link on the same line as the post date and so on? Whatever I do I get it on the line below. You can see it on http://www.bandung.seansite.net. Doesn’t look to nice :-/

    2. I added both english and indonesian to all posts (4) on http://www.bandung.seansite.net. But only the two first ones comes in indonesian if I choose that language from the sidebar. Why?

    3. Downloaded a version of indonesian, wanted to upload it to wp-includes/languages. The folder languages wasn’t there so I made it myself. Hmmmz, can’t see that It make use of my id.po file. Any idea why?

    Thanks again for your great plugins. You are abviously a gifted guy when it comes to making plugins :-). Hope that you can help me out on the issues above.

  16. malyfred 2005-03-23 / 7.53 pm

    >Sean Thank you:o)

    1) That’s a question of CSS: display: inline;

    2) I think that in your case it’s because of <!–more–> tag. Your post should look like:
    <lang_en>english bla bla</lang_en>
    <lang_xx>xx bla bla</lang_xx>
    <!--more-->
    <lang_en>english vla vla</lang_en>
    <lang_xx>xxx vla vla</lang_xx>

    3) .po is just source for .mo file and that one must be in wp-includes/languages directory. Use poEdit to generate it

  17. Sean 2005-03-24 / 4.33 am

    Malyfred,

    Thanks for your quick reply on my newbie questions :-)

    1. WHere should I add display: inline; in my style.css? Tried to add it to post-content but didn’t work, then tried to make post-content ul li and added it there but still didn’t work.

    Also tried to find others who had added this plugin to see what they have done, but can’t find any.

    Fantastic if you can help me out, if not I’ll just have to look around for a bit longer.

    2. You was right. Thank you :-)

    3. Added the .mo file now … but nothing happens.

    All this is for http://www.bandung.seansite.net.

    Thanks again!

  18. malyfred 2005-03-24 / 9.48 pm

    >Sean
    1) you have it in: post-title so…

    3) have you added ‘id’ to the list of allowed languages?

  19. joe 2005-03-25 / 8.31 pm

    It would be great to see your plugin to do that yeah… I think I will want to translate the categories too yes. Thank you very much for sharing the info with me on how to change the titles!

  20. malyfred 2005-03-31 / 8.18 pm

    >joe I have added translate-categories.zip plugin to the download section. Try it.

  21. Moshu 2005-04-05 / 4.52 pm

    Hi malyfred,
    I tried to use this plugin, but only with half success. I mean I got it work in the post title and inside the post, using the code provided, even the link for switching languages shows up in the meta line…
    But I have problems when wanting to change the language for the whole site. As I can see on your site clicking the “cesky” in the meta lione of the post will change the language in the sidebar. That didn’t work for me.
    Also, using the code for the sidebar menu for language change gives me an error.
    Am I missing something?
    (p.s. It is not on the blog I linked in my name here, it’s on a testbed.)

  22. malyfred 2005-04-05 / 5.15 pm

    >Moshu Comment #12 doesn’t help?

  23. Moshu 2005-04-07 / 6.24 pm

    Thanks, Malyfred, but not really. I am beyond that see this.
    Anyway I’ll give it a try again, will see what happen!

  24. ken1 2005-04-10 / 7.46 pm

    hello
    ne at this and trying to install polyglot plugin on my blogsite…
    question:
    in what file should i put the htmlcode you are talking about
    /?lp_lang_pref=en”>English

    regards

  25. ken1 2005-04-10 / 7.48 pm

    äsch…grrr..
    you know what code i mean right?


    Then you can offer them to set preffered language for entire blog as well (as you see in my menu). It can be done by code like this:

    /?lp_lang_pref=en”>English

    You are supposed to use where ‘xx’ is the ISO code of language. These can be found here: ISO codes

  26. diego_moreda 2005-04-10 / 11.05 pm

    hello,

    i am having some problems with the plugins, same one as most people have. i can display the posts in several languages, but i cant display the other parts of the weblog in a localized version. furthermore, if i activate the plugin the blog localization is overriden (ie. i have set the WLANG to spanish, and the blog, web admin, etc is in spanish if the plugin is not activated; it switches back to english if activated).
    i have tried several things but nothing worked … any help would be much appreciated.

    keep the good work!

  27. malyfred 2005-04-11 / 12.24 am

    >ken1 Yes I know:o) You can put it anywhere you want. I have it in sidebar.php but it depends on you. It’s just a link that change the language when you click on it.

  28. malyfred 2005-04-11 / 12.27 am

    >diego_moreda have you set $default_lang and $knownlangs properly? Because otherwise you don’t have to do anything special to switch the language of other stuff on your page. What the Polyglot does is actually nothing more than changing the value of WLANG according to user’s preferences. You just have to use gettext in you template and put translated strings into your .po/.mo files.

  29. Christoffer Soop » Blog Archive » A Polyglot WordPress? 2005-04-15 / 12.28 pm

    [...] should thus be considered as a cross-cutting concern. Update: I just found out about the Polyglot plugin which seems to do the trick. Haven’t tried it yet, but it seems promising. [...]

  30. wyrfel 2005-04-15 / 7.05 pm

    Hei guys, i just found a probable solution to the problem of a non working site localization: looking at the code you’ll realize that polyglot dupes part of code that is already present in wp-i10n.php .
    Look for if ($lang_change_locale && class_exists(’streamreader’)){ and comment out everything from if ( is_readable($mofile) && ($locale != ‘en_US’) ) { tp gettext_reader($input);//fred for WP1.5 or later
    }. Then add
    load_default_textdomain(); right after that.
    That should do it.

  31. wyrfel 2005-04-15 / 7.08 pm

    Ok, more readable again:
    Before:

    if ($lang_change_locale && class_exists('streamreader')){
    $locale = $lp_lang_pref;
    $mofile = ABSPATH . WPINC . "/languages/$locale.mo";

    if ( is_readable($mofile) && ($locale != 'en_US') ) {
    $input = new FileReader($mofile);
    } else {
    $input = false;
    }

    if(get_settings('version')

    After:

    if ($lang_change_locale && class_exists('streamreader')){
    $locale = $lp_lang_pref;
    $mofile = ABSPATH . WPINC . "/languages/$locale.mo";

    load_default_textdomain();

    require(ABSPATH . WPINC . '/locale.php');
    }

  32. wyrfel 2005-04-15 / 7.09 pm

    I’m giving up, you know what i mean. ;-)

  33. wyrfel 2005-04-15 / 9.03 pm

    Also found a solution for the problem with the previous_post/next_post links… You will have to edit wp-includes/template-functions-links.php. It includes the previous_post() and next_post() functions. Within those replace $string .= wptexturize($nextpost->post_title); with $string .= wptexturize(apply_filters('the_title', $nextpost->post_title, $nextpost));. Make sure to replace $nextpost with $lastpost for the previous_post function.

  34. every little secret » Blog Archive » New plugin found 2005-04-16 / 9.27 pm

    [...] 尚宮です!

    四月 17th, 2005
    New plugin found

    Polyglot 正是我想用的plugin,但似乎不是為初階用戶以設,嗯,改天要試試 [...]

  35. r0n 2005-04-18 / 6.29 pm

    Hello, thank you for cooking out this great plugin! Works like a charme for my posts. However one thing with WP 1.5 puzzles me a bit: When writing “PAGES” in different languages, I´m using english and german, there´s always the german PAGE content displayed on my site. It doesn´t pick the ‘lp_lang_pref=en’ variable with PAGES. As mentioned above, POSTS are fine.. When adding ‘?lp_lang_view=en’ to PAGE link URI it´s being displayed in english. Is it because the polyglot plugin doesn´t work with WP 1.5 PAGES or am I just overlooking anything? Thanks for attention so far

  36. malyfred 2005-04-20 / 10.32 am

    >wyrfel thx. it seems that you are using night build of WP right?

  37. malyfred 2005-04-20 / 10.38 am

    >r0n It should work with pages without any problems. You just have to edit template for pages to show the links for language versions on proper place. Another hint: Have you tried ?lp_lang_pref=en?

  38. r0n 2005-04-20 / 11.23 am

    I got it: I just C&P your suggested code for global blog language preferences :
    <a>/?lp_lang_pref=en">English</a>
    : however after I removed that slash before ?lp_lang_pref=en :
    <a>?lp_lang_pref=en">English</a>
    : PAGES will be displayed in the proper language now. Thanks for your feedback, I really appreciate. Whooh, now I´m really fine with my Blog and will go online soon ;))

  39. Loïc 2005-04-21 / 4.49 am

    Comment #30 worked for me too. Titles in sidebar are translated now.

    $mofile = ABSPATH . WPINC . "/languages/$locale.mo";
    /*if ( is_readable($mofile) && ($locale != 'en_US') ) {
    $input = new FileReader($mofile);
    } else {
    $input = false;
    }

    if(get_settings('version')

  40. Loïc 2005-04-21 / 4.50 am

    end of preceding post …

    $l10n['default'] = new gettext_reader($input);//fred for WP1.5 or later
    }*/
    load_default_textdomain();

  41. Francis 2005-04-21 / 5.24 pm

    Thank for this plugin! Very usefull. It seems to work. However, when switching from English to French, I have this message at the top a my screen before site content :

    Warning: Cannot use a scalar value as an array in d:\serveur local\easyphp1-7\www\wordpress\wp-includes\wp-l10n.php on line 74
    At the same time, all text become taller.

    Do you have a solution for me ?

  42. malyfred 2005-04-21 / 8.23 pm

    >Francis Look at Known bugs and change the code as you need.

  43. Francis 2005-04-25 / 4.32 pm

    Well Malyfred, thank you for your reply. But as a beginner,
    even passionate, and don’t understand what I should do with those
    lines of code (around line 75). I get lost. I’m using WordPress 1.5.
    Having my site fully bilingual under WordPress is crucial to me and it seems that your plugin is a must. Thank you again for your help.

  44. malyfred 2005-04-25 / 8.09 pm

    >Francis I’ve mentioned that this plugin is not for pure beginners! But anyway – the code looks like this:
    if(get_settings('version')<'1.5'){
    $l10n = new gettext_reader($input);// before WP1.5
    }
    else{
    $l10n['default'] = new gettext_reader($input);// for WP1.5 or later
    }

    But sometimes the version number detection doesn’t work. In your case you should replace all this code by :
    $l10n['default'] = new gettext_reader($input);

  45. Daniel S. Haischt 2005-04-26 / 8.06 pm

    If noone figured out already – This is the way how to localize the previous/next link in WP 1.5.

    You need to use the previous_post_link()/next_post_link() functions in your templates instead of previous_post()/next_post().

    If you take a look at the source of template-functions-links.php, you will figure that the standard previous_post() function is not using the apply_filters() function. previous_post_link() does!

    Cheers!

  46. Blog Archive | HILFE!!! 2005-04-28 / 5.05 pm

    [...] aquo; Mono-what? HILFE!!! Weiß jemand, wie ich das nette plugin polyglot installiert bekomme? Bitte helft mir!!! Dieser [...]

  47. Yves 2005-04-30 / 4.52 pm

    > Daniel S. Haischt comments #45
    Thank you for the Tip! It works perfectly!
    > Loic #39 and wyrfel #30
    Big thanks to you guys too.

    I struggled a bit to to manage to translate categories so here are the details:

    1) Install the plugin and activate it
    2) You have to edit the PO file for your target language (see The Codex for details). In this Po file insert your category names and their translation. Save it as a *.mo file and override the one you already have.
    3) Thats’ all. Enjoy!

    There is still the trouble of wp_list_pages() not displaying the translated page names or the fact that all the languages appears in the Archives/search pages but that might be easier to solve in version 1.5.1

    An again, thank you Jason and Malyfred for the tremendous work.

  48. Blomstereng.org - Blog » Blog Archive » LanguageSprk 2005-04-30 / 6.15 pm

    [...] « Plastic Toys Sprk N har jeg ftt installert ett nytt multi sprk plugin her p blogen. S n blir det litt mer oversiktlig her. Som fr kan man ve [...]

  49. Rob 2005-05-13 / 7.03 pm

    There was an XML validation problem with your plugin which was easily fixed. It involves changing the function lp_other_langs to output “&amp;” instead of “&”. Check out this url for more info:
    http://www.htmlhelp.com/tools/validator/problems.html#amp

    A very good plugin otherwise. Thanks for the hard work.

  50. empdesign | Blog Archive | Plugins Wp 2005-05-16 / 6.54 pm

    [...] lugin For WordPress: Permite añadir un sistema integrado de encuestas en la bitácora. Polyglot: Versión mejo [...]

  51. Carlo 2005-05-19 / 3.23 am

    Your plugin works like a charm! The only problem I’m having now, is that I can’t manage to set italian as the language displayed by default (I did set ‘it’ as preferred language in Polyglot.php). I’m also forced to put even italian parts between lang tags, otherwise both versions are displayed.
    Can you suggest me a solution?

    Thanks in advance, Carlo.

  52. malyfred 2005-05-19 / 4.05 am

    >Carlo That’s not a bug that’s a feature:o) There has been left old and not-true-anymore comment for default lang.

    Current behaviour of filtering lang versions is described in the post. Every language version must be enclosed by <lang_xx> tags and unenclosed text is always shown.

    And about your ‘it’ issue – don’t forget that Polyglot gets the information about your prefered language from the browser and there is english set as default in most cases. Default language is not used if your post has appropriate language version.

  53. Carlo 2005-05-19 / 4.48 am

    malyfred, thank you for replying so quickly.
    As you can see in my blog, I managed to make it work, just by adding to my main template the code you suggested above for the global language prefs. :)
    Now everything is working as I want.
    Next step will be to make the whole blog bilingual…
    Thank you again, and keep up the great work!

    Best regards,
    Carlo.

  54. Pete 2005-05-21 / 4.16 pm

    Hola, I don’t know if its mentioned anywhere, but at least for me I had to change in wp-config.php the line
    define (’WPLANG’, ”);
    to
    define (’WPLANG’, ‘en_US’);
    (or put your own localization in), to get ?lp_lang_pref=en (or some other language) type switching working. Otherwise language switching for whole blog didn’t work, I guess it got always overwritten or something as locale.php checks for empty string.

  55. Pete 2005-05-21 / 6.58 pm

    … and I got this to work fabulously with WP-Cache by changing the cookie name in polyglot.php to wordpress_lang_pref (wp-cache searches for “wordpress”). Dunno if it is the proper way though.

  56. malyfred 2005-05-21 / 9.23 pm

    >Pete Thank you! That could be answer to many questions here. It’s also good to know that polyglot works with WP-Cache.

  57. fethiye 2005-05-22 / 10.01 pm

    thanks for this great plugin! have been using it for a while now, and now i want to add the translate-categories, but that does not seem to work. downloaded, activated it but still shows my category as a huge text including the etc tags…

  58. malyfred 2005-05-22 / 10.42 pm

    >fethiye Of course – because translate-ctagories works in a different way. You have to add translations of names of your categories to your .mo file. You cannot use tags as in your posts.

  59. fethiye 2005-05-23 / 3.21 am

    thanks for the quick response. the .mo file for my language (Turkish) does not exist. So I made a very basic .po file (containing “Categories” and one of my categories’ name) compiled it and dropped it into the multilingual subdirectory. Nothing seem to change. Seems like I am missing something easy, but what?

  60. Training Today’s Athlete » WordPress Plugins 2005-05-23 / 4.58 am

    [...] ic/tools/wordpress/wp-gatekeeper.html Polyglot for multilingual posts and stuff like that. fredfred.net/skriker/index.php/ [...]

  61. malyfred 2005-05-23 / 10.36 am

    >fethiye I’ve tried to download tr.mo file from your server and it seems that it is not at the proper place: wp-includes/languages/tr.mo

    Try also simple _e("your testing category") code in your template, as translate-categories could be buggy.

  62. JÄÅ Preview | skriker 2005-05-23 / 5.05 pm

    [...] and activate it. P. S. You should also try these plugins: IImage Browser, IImage Gallery, Polyglot, IImage Panorama BTW do you know how to pronounce JÄÅ? No? Ok – just like this: yaeo:) [...]

  63. fethiye 2005-05-24 / 11.03 pm

    Thanks a lot for your help! I just didn’t know where to put the .mo file, and could not find any info about it. Now it is in the directory you specified, but nothing changed ;( I also put the .po file there — a basic one. Maybe I am doing something wrong with that one, too!

  64. malyfred 2005-05-25 / 1.32 am

    >fethiye simplest test: do you have _e('Categories'); in your sidebar.php? .po file seems to be ok. Which version of WP do you use?

  65. fethiye 2005-05-25 / 7.11 am

    I am using WP 1.5, and yes I do have _e(’Categories’) in my sidebar.php (just double checked it). I also added that “bread” -> “ekmek” as a category in that .po file, too. Oh, yes, I do have this plugin activated as well.

    thanks again for looking into this!

  66. malyfred 2005-05-25 / 11.09 am

    >fethiye I’ve changed the code of Polyglot a bit – download it now and let me know.

  67. Sylvain 2005-05-25 / 3.23 pm

    I’m glad to see I’m not the only one who has problems w/polyglot! ;-) I’m a newbie w/WP and malyfred was really helpful when I sent him an email about the installation (thanx again, dude!). Reading through this forum I finally was able to get not only the posts, but the rest of my blog translated too (Pete’s comment #54 did it for me! Thanx, man). One weird thing, though: not all of my page gets translated (words like “Categories”, “Archives”, “Links” etc.) remain in English, even if they ARE in my .mo files, but their subcategories come out properly!?!? What’s with that? One more thing, I’ve been searching the web like a madman and read everything I could on gettext for the past week, but I still can’t figure out how to “gettext” anything. I mean, there’s not even a .exe file in the bundle I’ve downloaded!!!Would anyone care to explain this ssssssllllllloooowwwwlllyyy, please.

  68. ☆MY BLOG☆僕のブログ☆MON BLOG☆ » Blog Archive » blogging from downtown Sendai on my cellphone… 2005-05-25 / 3.25 pm

    [...] rom downtown Sendai on my cellphone…

    Ain’t that awesome! (^O^)/♪

    This entry was posted

    on Tuesday, M [...]

  69. malyfred 2005-05-25 / 8.02 pm

    >Sylvain OK – how to gettext anything, let’s use the word “Categories” in your sidebar.php as an example.

    Open the sidebar.php in your favourite text editor (preferably supporting UTF-8, but…). Find the word “Categories”. It can look e.g. like:
    <h3>Categories</h3>
    chage it to this:
    <h3><?php _e('Categories');?></h3>

    and you have successfully gettexed “Categories”.

  70. I did it my way » Blog Archive » Multilanguage Mehrsprachigkeit 2005-05-26 / 9.06 am

    [...] hen die kein Deutsch sprechen. Damit man nicht beide Texte lesen muss hilft mir ein nettes Worpress-Plugin.

    This entry was posted

    [...]

  71. fethiye 2005-05-27 / 2.25 am

    the new polygot didn’t seem to change anything…

  72. malyfred 2005-05-27 / 10.48 pm

    >fethiye hmmm – have you tried comment #54?

  73. Sylvain 2005-05-29 / 8.53 am

    >malyfred You’re the man! Thanx to you it looks like I’ll be up and running on schedule (June 1st)… One thing, though, I can’t seem to find some of the strings I’d like to “gettext”, like “Leave a comment” for example. I’ve looked in every file manually, ran a search through windows, etc. I know it must be somewhere, because you changed it to “Napsat komentář” and “Kommentera”. Sorry I’m so persistent, but I’d really like to give my readers the option to have everything in their prefered language.

  74. malyfred 2005-05-29 / 10.03 am

    >Sylvain C’mon! Try harder! comments.php and “Leave a Reply” in your current theme.

  75. The Blog of Henrik Pauli » WordPress Polyglot plugin 2005-05-29 / 6.35 pm

    [...] Uncategorized — Henrik Pauli @ 18:35 One of the plugins I’m using is Polyglot, which would be good if it did a couple things differently.  One of them being showi [...]

  76. r0n 2005-06-01 / 2.24 pm

    does anyone know if there´s a way to insert the currently displayed language into header meta tags?

    <META name="language" content="<?php need_function () ; ?>">

  77. malyfred 2005-06-02 / 8.52 pm

    >r0n Download the latest version of Polyglot and set $polyglot_settings['print_meta'] = true;

  78. r0n 2005-06-03 / 10.25 am

    Thanks a lot, Fred!

  79. r0n 2005-06-03 / 12.38 pm

    I´ve been running into a couple of more issues about getting the currently displayed language value (Fred may already know…) so I added two simple functions to my polyglot.php which ECHO or RETURN the ISO code:


    function polyglot_echolang(){
    global $lp_lang_pref;
    echo $lp_lang_pref;
    }

    function polyglot_returnlang(){
    global $lp_lang_pref;
    return $lp_lang_pref;
    }

    The functions seem to be working with either ?lp_lang_pref=XX or ?lp_lang_view=XX on my site.

    May be useful i.g. to offer localized RSS feeds like:

    <?php bloginfo('rss2_url'); ?>?lp_lang_view=<?php polyglot_echolang(); ?>

    or whenever one needs to offer different content for each language, like <META> description, keyword TAGs etc..

  80. De Culturis Mundi 2005-06-03 / 7.25 pm

    Multilingual blogging

    First of all: some clarification is due about the terminology. As I mentioned in one of my first posts I chose WP beacuse I loved “the possibility of writing in different languages, with different alphabets without having to think for a moment …

  81. I did it my way » Blog Archive » Pimp my Blog 2005-06-09 / 5.40 pm

    [...] ines Artikels. Find ich klasse! Cat2Tag: Erstellt “Tags” aus den Kategorien. Polyglot: Ermöglicht das posten in mehreren Sprachen. OK, das geht auch so, aber dank dieses Plug [...]

  82. FN 2005-06-09 / 8.43 pm

    This looks like the missing-link I’ve been looking for – however Language Picker’s site give a 404 so I really don’t know how to install this. I’m a professional PHP coder so I could do it without a problem – but my issue is where do I put the file and what inclusions are required? Sorry to add to the list of “Help Me” posts malyfred – if you have time, your direction would be appreciated :)

    -FN-

  83. FN 2005-06-09 / 9.59 pm

    Ok – I managed to get it myself – sorry for the premature plea for help. My only question left is the multi-lingual RSS Feed:

    http://nc.synergyxr.net/nema/feed/?lp_lang_view=en

    I see in “description” is shows both the lang-en and lang-de… should it show both like that or just the one for the language the client has selected? If that feed page is right, no worries, I’m just not familiar enough with XML to know.

    Thanks again,
    -FN-

  84. r0n 2005-06-10 / 11.40 am

    FN, you should add an excerpt (=description) filter to polyglot.php


    add_filter('the_excerpt', 'lang_picker_respect_more',1);

    then you´ll get proper localized RSS Feeds

  85. Younghusband 2005-06-12 / 8.31 am

    What would put the icing on the cake is if we could make a quicktag for Lang 1 Lang 2 etc, so that we don’t have to hand type each time. Any thoughts?

  86. r0n 2005-06-12 / 4.12 pm

    Could be done by adding (for each language ISO) to your quicktags.js:

    edButtons[edButtons.length] =
    new edButton('ed_lang_xx'
    ,'lang_xx'
    ,''
    ,''
    );

  87. r0n 2005-06-12 / 4.14 pm

    ahh, sorry, should be:

    edButtons[edButtons.length] =
    new edButton('ed_lang_xx'
    ,'lang_xx'
    ,'<lang_xx>'
    ,'</lang_xx>'
    );

  88. malyfred 2005-06-13 / 2.49 am

    >r0n&FN I’ve added this fix to the current version of Polyglot.

  89. Sylvain 2005-06-20 / 9.28 am

    >Younghusband

    Try this guide, it worked great for me!

  90. besorgt. » blog.start 2005-06-24 / 12.22 pm

    [...] nt in time. This blog is based on a slightly modified version of WordPress and the plugin PolyGlot by Martin Chlupac which permits multilingual entries.

    posted in the w [...]

  91. Vito Tardia 2005-06-29 / 9.41 pm

    [...] ruenza nell’interfaccia, almeno fino a quando non avrò imparato a destreggiarmi con Polyglot e GetText. D’altra parte se fosse facile non sarebbe altrettanto divertente e vist [...]

  92. Christoffer Soop » A Polyglot WordPress? 2005-07-02 / 10.01 pm

    [...] should thus be considered as a cross-cutting concern. Update: I just found out about the Polyglot plugin which seems to do the trick. Haven’t tried it yet, but it seems promising. [...]

  93. seyd » Just colophoning my changelog 2005-07-18 / 9.18 am

    [...] e the most recent and the two bottom ones are random. As for the languages I had installed Polyglot and worked out all the localizations ( thanks [...]

  94. seyd » Just colophoning my changelog 2005-07-18 / 9.20 am

    [...] e the most recent and the two bottom ones are random. As for the languages I had installed Polyglot and worked out all the localizations ( thanks Pankaj for that hi.mo file! ), but in the e [...]

  95. Jiyul 2005-07-23 / 1.04 pm

    Hey, thanks for what you did!
    but…
    is multingual rss works? I think yours dont work too.

    http://fredfred.net/skriker/index.php/feed/?lp_lang_view=en

    Am I miss understanding?

    please help me.

  96. z 2005-07-23 / 4.17 pm

    i’m trying the plugin on a new photoblog and it does the job for me. however i’m following the instructions for the rss feeds, but besides the default language, the second language rss doesn’t work. the rss feed reader keeps spitting out errors. is there anything not listed here that i may have missed?

  97. micael 2005-07-24 / 6.36 am

    hi malyfred,
    Thank you very much for this plugin.
    It’s very usefull.
    unfortunatly, the list_cats of the translate-categories plugin don’t work …
    First I increase the number of allowed characters of “cat_name” in the database. (because titles were cutted)
    I try to touch this with no success:
    add_filter(’list_cats’,'translate_link’);
    or add some _e() in my sidebar.

    I see list_cats translation of your site work.
    Can you give me a way of work please?
    Thanks.

  98. micael 2005-07-24 / 9.01 am

    hmmm, “cat_name” don’t allow html tags.
    so, something like cat_encat_fr
    will don’t work in “list_cats”. It’s sure…

  99. micael 2005-07-26 / 12.56 am

    I found the solution:
    I remove all the “wp_specialchars” relative to “cat_name” in wp-admin/categories.php

    for example:
    $cat_name = wp_specialchars($_POST['cat_name']);
    become
    $cat_name = $_POST['cat_name'];

    now, I have a HTML render inside my “wp_list_cats” and the polyglot plugin understand it.
    Coool.

  100. malyfred 2005-07-26 / 5.23 pm

    >Jiyul&z I’m sorry that the instructions for RSS localization are not as clear as they could be. You have to use URL like this:
    http://addressofyourweb/?feed=rss2&lp_lang_pref=en

  101. Rauru Blog » Blog Archive » Polyglot 2005-07-27 / 5.31 pm

    [...] anohito on Thursday, July 28th, 2005 at 0:25 Now testing Polyglot, a plugin that enables to post in multiple languages. You can follow any [...]

  102. Metabolik BioHacklab » Blog Archive » Wordpress multilingüe 2005-07-28 / 11.29 am

    [...] a y castellano. Es muy f�cil! Hay que descargarse un plugin llamado Polyglot. El caso es que dicho plugin al parecer no contempla el idioma euskara (eu) as� que un co [...]

  103. ptryk 2005-08-01 / 4.25 pm

    ran into something i can’t seem to fix.. i am using a plugin to fix menu’s from pages..

    well.. when i am in a page, and if someone should change the language, .. it puts them back to the index page.. also i get a database error when using
    get_page_link() or get_permalink() used e.g…


    /?lp_lang_pref=en">[en]

    looks like the plugin can’t concoctenate?

  104. iLBorro’s blog » Wordpress multilingua? 2005-08-03 / 12.18 pm

    [...] post possa essere sia in italiano che in inglese? La cosa sembra essere semplice grazie a questo plugin. Lo proverò, e vi terrò informati Nessu [...]

  105. freshlabs — Wordpress multilanguage 2005-08-06 / 11.26 am

    [...] Bislang habe ich zwei davon ausprobiert: Polyglot (Autor URI: http://fredfred.net/skriker/index.php/polyglot) Polyglot erlaubt es, die Sprache in einem Post mi [...]

  106. malyfred 2005-08-09 / 10.58 pm

    >ptryk Don’t forget that you cannot use: ?lp_lang... with any kind of mod_rewrite or permalinks:(

  107. Netlex News » Blog Archive » test 2005-08-16 / 9.17 pm

    [...] test Internationalisation Basic bilingual : installed Multilingual Polyglot This entry was posted on Tuesday, August 16th, 20 [...]

  108. dan 2005-08-21 / 2.33 pm

    wow, great plugin! just what I want :-), Great Thanks!

  109. Valet och kvalet… at Spacewaster 2005-08-24 / 3.35 pm

    [...] Uppdatering: Gjorde en snabb sökning, och hittade Polyglot, ska kolla bättre hur det fungerar i morgon. [...]

  110. Bilingual at Spacewaster 2005-08-24 / 9.40 pm

    [...] I’ve now installed the Polyglot plug-in, but there’s some problems as you might see… I’m working on a solution. [...]

  111. Len » Blog Archive » Kadishtu 1.1 2005-08-31 / 12.57 pm

    [...] Je teste un plugin d’i18n appellé Polyglot donc j’ai inclus une barre de menu de langage au thème et fait d’autres petits changements. [...]

  112. Bilingual at Spacewaster 2005-09-06 / 12.48 pm

    [...] now installed the Polyglot plug-in, but there’s some problems as you might see… I’m working on a solution. Jag har nu installerat Polyglot, men som du kanske mker r det liteproblem… jobbar med felskningen.   #     [...]

  113. Fixed the language 2005-09-09 / 9.04 am

    [...] Fixed the language, found out that it was a clash between Polyglot and PreFormatted, sadly Polyglot doesn’t work with my “Besides” blog-thingy. Have to look into that. Found another “clash”, Brian’s Latest comments didn’t want to translate… [...]

  114. Fairweb 2005-09-16 / 10.36 am

    Adaptation et adoption du plugin Polyglot

    On m’a demandé d’adapter le bilinguisme sur un site réalisé avec Wordpress. Inutile de réinventer le monde. Wordpress est open source et on ne développe des plugins que lorsqu’on ne les trouve pas ailleurs. J’ai testé plu…

  115. Agaponeo's 2005-09-18 / 6.58 pm

    Problems with language

    Thanks at the plugin of malyfred for WordPress, now I can write in some languages, so the people can read in his language.
    But I think in this way I will get more confused with the languages, that I already get always confused with them (who meet me, …

  116. Agaponeo 2005-09-19 / 10.41 am

    HI.. thanks for this plugin…
    But I can’t get working the translate categories… really I don’t know how translate them… (the archives works well)
    and in the side bar… the tags doesn’t work for me :(…
    any clue?

    thanks again for this plugin :)

  117. malyfred 2005-09-19 / 1.08 pm

    Agaponeo> Tags in the sidebar seem to be ok. They look like they should and they work for me. Only problem I have noticed is that you’ve left some spaces or UTF BOM in the polyglot.php so you get warning at the very begining of every page.

    Translate categories plugin is very unreliable because it works in a very dirty way and probably only with wp_list_cats():( Unfortunately I have not found better way yet.

  118. Trackback 2005-09-19 / 1.19 pm

    Trackback: http://dongchimi.org/wp/?p=20

  119. El Rincón de Boriel » Boriel’s blog goes bilingualEl blog de Boriel se vuelve bilingüe 2005-09-19 / 2.00 pm

    [...] Now, and thanks to the polyglot plugin for Wordpress, this site will be (whereever possible) in both languages, English and Spanish (and apologies for English grammar/spell mistakes ). [...]

  120. Agaponeo 2005-09-19 / 7.42 pm

    Sorry.. I made some mistake.. can you delete the upper post? :)

    Thanks… but… the warning was for another plugin conflict that I resolved…

    The thing may be is that in the sidebar there is no this code –?php if(function_exists(’lp_other_langs’)) {
    //display existing language versions of the post
    lp_other_langs(’ ‘,”, ”, ”, ”);
    }?–

    do you think that can be that…?

    (sorry my english)

  121. malyfred 2005-09-19 / 8.16 pm

    Dear Agaponeo, I have checked your site twice and it looks exactly as it should. And it even works!:) So what is exactly your problem? What kind of different behaviour do you expect?

  122. Agaponeo 2005-09-21 / 10.17 am

    Sorry… for bother you…
    I wanted to be able to change the language in the sidebar, just some small content.

    But no problem. and like always thanks for the plugin.
    (is a little tyring write in many languages :S )

    bye bye

  123. malyfred 2005-09-21 / 12.18 pm

    Agaponeo> Maybe I’ve got it finally – you want to have some ‘content’ in the sidebar in different languages? Easy!

    1) ‘gettext’ it: _e('some text');

    2) add this translation into your .mo files

  124. Marc 2005-09-22 / 9.49 am

    Hello malyfred,

    first off, thanks for creating the currently only stable multilingual extension to WordPress. It has already helped me a lot. :-)

    One thing bothers me, tho – not being able to translate page titles yet. “translate-categories” works great, I just wished it would also do so for pages. Do I understand correctly that it cannot work because WordPress doesn’t offer an appropriate filter hook for wp_list_pages? Does the WordPress beta version do so, or do you have any other idea to solve that?

    Thanks for your help,
    Marc

  125. malyfred 2005-09-22 / 11.56 am

    Marc> Add this hook to your plugin:

    add_filter('wp_list_pages', 'lang_picker_respect_more',1);

    or re-download Polyglot. It’s not perfect because titles of genereated links stay untranslated, but…

    You can now translate page titles in exactly same way as post titles.

    example:
    <lang_en>English title</lang_en><lang_cs>Český název</lang_cs>

    It doesn’t look translated in administration (WP bug) but it works fine on the final page.

  126. Marc 2005-09-22 / 4.33 pm

    Well, that’s a start, thanks indeed! :-) Translating the links as well will require a new WordPress core filter hook, right? Like that I’d have already created a “translate-cats-and-pages” plugin… ;-)

    Regards,
    Marc

  127. Secretservices Performance Blog 2005-09-22 / 6.49 pm

    Mehrsprachig….Polyglot

    Um mein Blog mehrsprachig anzubieten, habe ich auf das Plugin Polyglot zurückgegriffen. Das funktioniert für die Artikel, wie hier wohl auch zu sehen, recht gut. Das Manko liegt darin, daß die Menüleiste nicht genauso einfach übersetzt werden kan…

  128. Agaponeo 2005-09-22 / 8.24 pm

    thanks for your patient.. and for undestandme what I wanted…
    sad is that I Think I can’t exec, i tryed some code that I find but the wordpress gettexec page didn’t really helped…

    Another thing.. Nice the new plugin ;)

  129. malyfred 2005-09-23 / 12.00 am

    Marc> Could you test the latest version of Polyglot? You don’t need any plugin for translating categories/pages anymore. But for links… yes, you are right, we need a new hook:(

  130. Agaponeo 2005-09-24 / 2.32 am

    I think I’m annoying… :)
    well Thanks for averyting and for this awesome plugin…
    I manage everything… (Is just some time to learn code ;) ). I get well with gettexec now… and how to edit po, pot & mo files… so now I have my traductions how I like them :)

    Sincerly Thank you again.

  131. Vito Tardia 2005-09-29 / 2.02 pm

    [...] Siccome ho intenzione di scrivere sia in inglese che in italiano, è probabile che ci sia qualche incongruenza nell’interfaccia, almeno fino a che non sarò riuscito a integrare al meglio Polyglot e GetText. Lo sapevo che dopo i primi esperimenti su Blogger la mi curiosità mi avrebbe diretto verso WordPress. Quindi, visto che da qualche parte si deve pur cominciare, ho comiciato con l’installarlo e pasticciare un po’ con il codice…stupendo! Leggi » [...]

  132. Marc 2005-09-29 / 10.18 pm

    malyfred,

    Pages work fine, thank you, but without the links it’s not really enough for me yet. Anyway, thanks for confirming my suspicions – I’m still quite of a WP-n00b, so that helps my ego a little. ;-)

    Marc

  133. Goulven 2005-09-30 / 7.50 pm

    Excellent plug-in. I use it for my site in english, french and arabic. I have a problem with arabic because the tag at the beginning of the page must have the dir=”rtl” parameter when other languages must have dir”ltr”.

    Is it possible to complete the plug-in with this parameter?

    Thanks and thanks again for your plug-in!

  134. malyfred 2005-09-30 / 11.59 pm

    Goulven> If I understand the concept of ‘ltr’ and ‘rtl’ codes – it must be specified in <html> tag and that cannot be done automaticaly because there is no Wordpress hook for that.

    But you can put this code to your header.php file:


    <html

    <?php
    if(polyglot_get_lang() == 'ar'){
    echo 'dir="rtl"';}
    ?>
    >

    Don’t forget to re-download Polyglot.zip because polyglot_get_lang() function has been added recently.

  135. malyfred 2005-10-03 / 11.03 pm

    ALL> I’ve noticed the WP/PHP bug in WP 1.5.2 and PHP 4.4.0. You have to fix gettext.php like this:

    //$MAGIC1 = (int)0x950412de; //bug in PHP 5
    //$MAGIC1 = (int) - 1794895138; //bug in PHP 4.4.0
    $MAGIC1 = 2500072158;

    //$MAGIC2 = (int)0xde120495; //bug
    //$MAGIC2 = (int) - 569244523;// bug in PHP 4.4.0
    $MAGIC2 = 3725722773;

  136. Goulven 2005-10-04 / 9.33 am

    malyfred> Thanks, it’s working!

  137. Tom 2005-10-13 / 3.17 pm

    I searching a way to translate categories in the RSS . Content of the post is correctly translated but not the categories… I tried some add_filter but no ways :(
    Any ideas ?

    PS: I updated my polyglot.php (don’t what had change) but I updated ;) I ought be nice to recall this version 0.5 because there is approx more than 100 new lines. But I understand that you’re probably overbooked.

    Always a great work/job! Thanks!
    Tom

  138. Tom 2005-10-13 / 3.50 pm

    I have consider a bit and here is the solution.
    Just add these following line to your translate-categories.php :


    function translate_the_category_rss($text){

    return preg_replace_callback('/()(.*?)()/i','translate_callback',$text);
    }
    add_filter('the_category_rss', 'translate_the_category_rss', 1);

  139. malyfred 2005-10-13 / 5.33 pm

    Tom> Thank you! I’ve added this fix to “official” version. But this version should be enough:


    add_filter('the_category_rss','__',1);

  140. Mateusz Łoskot 2005-10-15 / 5.17 am

    Hi,

    First, thanks guys for your great work and Polyglot plugin.

    Here is my small customization I called “Polyglot with flags” (down on the page):

    http://mateusz.loskot.net/projects/wordpress/

    and it displays small flags instead of text label to indicate what languages are available for some post/page.
    You can configure it to use flags or text labels.

    I believe Martin you don’t mind I put it on my page to download :-)

    I added a few lines of code and big set of flags from http://www.crwflags.com/fotw/flags/wflags20.html (with minor file names customization).
    More information is availabile in my comments in the code and README.txt file in archive on my website.

    I also have some problem, but I think it is a general problem or I don’t underdstant something :)
    Here is one of my posts in polish language and there is no english content for it, only polish, but as you see there is english flag (or text label) as available language:
    http://mateusz.loskot.net/2005/10/15/jak-warszawska-straz-miejska-kleka-przed-j-oleksym/

    I have defined english as my default language, but I expect that if I put some post only in polish then only polish flag is visible. Am I right?

    Could you explain me this behaviour?
    What exactly default language means? Browser language or WP language?
    Cheers

  141. Tomkun 2005-10-15 / 6.35 am

    I downloaded this plugin yesterday and have got it working (mostly), but I have a problem when using it with firefox.

    In IE, everything is as it should be and when I navigate to a page, it remembers the language settings.

    But in firefox, when navigating to a page it ‘forgets’ what language it should be in and goes back to English. Anybody know of a fix for this? I am assuming it’s not a problem because it works fine in IE. It’s just that I personally use Firefox and it’s a pain in the bum!

    You can see what I mean here
    http://www.tensamurai.com

    Thanks :-)

  142. Tomkun 2005-10-15 / 7.18 am

    Oops! Never mind about that last request… It was my error!

  143. Tensamurai 2005-10-15 / 9.07 am

    Language

    Today, I spent a lot of time making sure that the different language interfaces work. Now the site is available in English and Japanese. It took a really long time to get everything working the way I wanted it to, but now I am fairly happy with it. …

  144. Tensamurai » Blog Archive » Language言葉 2005-10-15 / 9.11 am

    [...] right now! The plugin is available from here. Posted by Tomkun under General | Permalink | Trackback | « English!| [...]

  145. Mateusz Łoskot 2005-10-15 / 5.19 pm

    About problem described in my comment #140

    So, here is step-by-step desc of my problem.
    May be someone will be able to give a piece of advice.

    1. My Firefox has selected polish language as default (first on languages list in FF configuration). I have also selected english (placed on the langs list below polish).

    2. English is default language for my WP installation

    3. Most of my blog posts are in english and very few in polish

    4. Example of post in polish in my blog:
    http://mateusz.loskot.net/2005/10/15/jak-warszawska-straz-miejska-kleka-przed-j-oleksym/

    5. What is wrong in my opinion?
    Why there is english flag below title header of my post in polish? I have no .. block of content, only …

    Here is another post which is available in both langauges: polish and english:

    http://mateusz.loskot.net/2005/08/22/welcome-to-the-jungle/

    and certainly it works perfectly, I see polish version and english flag, but when I see english version I have polish flag.

    The question is:
    Why I have english flag for post which is available ONLY in polish?

    Thanks for any help

  146. malyfred 2005-10-16 / 12.06 am

    Mateusz Łoskot> That’s a bug and I’ve fixed it in “official” version. Thanx for report.

    Btw I consider “taging” of one language posts as very problematic, because you get empty post if your default language and currently selected language are different than the language of the post. I wouldn’t recommend you doing that.

  147. Mateusz Łoskot 2005-10-16 / 12.31 am

    malyfred> I understand. Yes, I see having only one lang of post is a bit problematic, but I think it shouldn’t be difficult to solve. I’ll try to look at this but now I have not much time :-(
    Where I find official version? I could put this fix to my Polyglot-with-flags ;-)
    BTW, what do you think about my customization of Polyglot?

  148. malyfred 2005-10-16 / 1.10 am

    Mateusz Łoskot> Official version ~ re-download it from this page.

    One version language “issue” is actually quite difficult to solve as there is no obvious expected behaviour. Some people prefere current behaviour (as I do), some other would expect some text shown all the time. This problem gets bigger with two, three,… languages when the default language version is not present. Which version is the right one then?

  149. Mateusz Łoskot 2005-10-16 / 3.15 am

    malyfred> This problem gets bigger with two, three,…languages when the default language version is not present.

    Yes you’re right, I’m convinced.

    malyfred> Which version is the right one then?

    What do you mean? Version of what?

  150. malyfred 2005-10-16 / 7.42 pm

    Mateusz Łoskot> Language version…:)

  151. Mateusz Łoskot 2005-10-16 / 9.33 pm

    malyfred> Mateusz Łoskot> Language version…:)

    Oh, I see ;-)
    English is default language for my website.
    But as you suggested, I decided provide both versoins – pl, en – and i.e. if some of my post is in polish then I put short information as here:
    http://mateusz.loskot.net/2005/10/16/napisalem-do-oleksego/

    Not very elegant, but does not confuse users.

    And what about polyglot-with-flags?

  152. malyfred 2005-10-17 / 2.16 am

    Mateusz Łoskot> Well, I haven’t found any useful information about copyright of these flags.

    I take your version as a kind of “suggestion” what could be implemented to Polyglot in next version. Let me know if you have details about flags copyright issue.

  153. jesse 2005-10-18 / 8.54 pm

    hey Malyfred et al!
    thanks for such a useful blogging tool. The only thing that’s really driving me crazy is that only some of my page titles respond to the tags. Some work, others don’t.. Any ideas/suggestions?

  154. malyfred 2005-10-18 / 10.27 pm

    jesse> Do you use the latest version of Polyglot?

  155. jesse 2005-10-18 / 11.19 pm

    yes, i believe so. The one linked up top, correct? I also followed your advice in post 125 and added the following hook:

    add_filter(’wp_list_pages’, ‘lang_picker_respect_more’,1);

  156. malyfred 2005-10-18 / 11.51 pm

    jesse> Re-download it now just to be sure. There have been many things done about pages and related stuff recently and I’ve released new version (0.6) today.

    Which parameters do you pass to your wp_list_pages()?

  157. jesse 2005-10-19 / 12.30 am

    i just re-downloaded it, to no avail. I’m not sure where to check on which parameters i pass to my wp_list_pages()
    I’m only moderatly familiar with PHP/wordpress, I’m afraid! I realize that you put up a disclaimer regarding us newbies using this pluggin, but I am very grateful for your help.

  158. malyfred 2005-10-19 / 12.42 am

    jesse> You are calling wp_list_pages() somewhere in your theme. And there is some “stuff” between brackets. I’d like to know this stuff to be able to simulate it on my server.

  159. jesse 2005-10-19 / 12.50 am

    i see. I’m using the blix theme and haven’t made any significant changes: http://www.kingcosmonaut.de/blix/

    Hopefully you’ll find some answers there..

    Or is there anywhere I should be looking in particular? Like the Index.php page or something?

  160. malyfred 2005-10-19 / 2.14 pm

    jesse> There are about 10 files in the theme… is it that hard to check all of them?

  161. jesse 2005-10-20 / 12.18 am

    ok! I finally found it in the sidebar.php page. It is coded as follows:

  162. jesse 2005-10-20 / 12.20 am

    In between the brackets after wp_list_pages is written: ‘title_li=&sort_column=menu_order&exclude=’.$excluded

  163. malyfred 2005-10-20 / 1.11 am

    jesse> That seems ok:( Have you tried to deactivete all other plugins? It could be some plugins collision.

  164. jesse 2005-10-20 / 3.20 am

    yeah, i tried that :(

    I’m afraid it may just be over my head, but I’ll keep digging for an answer. Thanks for taking a look at it!

  165. Mateusz Łoskot 2005-10-23 / 12.51 am

    Hi malyfred!
    I sent some quoestions about copyrights of flags I use in my Polyglot customization.
    Here are two responses I got from Rob Raeside from FOTW (http://www.crwflags.com/fotw/)

    Here for my first question for copyrights explanation:

    ###########################################
    Hi Mateusz,
    You are welcome to use the images from FOTW provided you don’t end
    up selling them (i.e. “no commercial use”). For open source purpose,
    all we ask is that the source of the images be provided in the acknowledgements areas.

    Rob Raeside
    Director, Flags of the World,
    Wolfville, Nova Scotia, Canada
    http://flagspot.net

    ###########################################

    and second for more details about that acknowledgements:

    ###########################################
    Hi again, Mateusz,
    You should indicate something along the lines of “all flag images
    courtesy of FOTW (http://flagspot.net). For re-use of images, please
    see http://flagspot.net/flags/disclaim.html.

    I can’t guarantee every image on FOTW is owned by FOTW for copyright
    purposes, but certainly all the national and state ones are. So
    unless you re-use an image that states it was provided by a third
    party, you would be OK with this statement.


    Rob Raeside
    Director, Flags of the World,
    Wolfville, Nova Scotia, Canada
    http://flagspot.net
    ###########################################

    So, what do you think now about flags in Polyglot?

  166. malyfred 2005-10-23 / 10.54 am

    Mateusz Łoskot> I’ve already implemented this “flag feature” as a part of big refurbishment of Polyglot’s code last week.

    I’ve used flags from GPL project http://www.phpmyvisites.net/

    But thank you for your idea and work!

  167. Mateusz Łoskot 2005-10-23 / 4.09 pm

    So, are you going to release Polyglot with those flags from phpMyVisities?
    I’m strongly interested.

  168. malyfred 2005-10-23 / 7.36 pm

    Mateusz Łoskot> Download Polyglot ver. 0.6 and you’ll see the flash of the future:))

  169. Tomkun 2005-10-24 / 1.35 pm

    Help!

    I am having serious trouble with this plug-in. Every time I try to switch to Japanese, I get this error:

    Fatal error: Cannot instantiate non-existent class: cachedfilereader in /home/tensamur/public_html/wp-includes/wp-l10n.php on line 72

    I didn’t used to have this problem, but it suddenly sprung up.

    I have reinstalled Wordpress, and the latest version of Polyglot (0.6), but I still can’t solve it.

    Anybody got any advice?

  170. Tomkun 2005-10-24 / 1.46 pm

    Oops…

    Sorry to waste your time. I edited the wrong file.

    wp-settings.php instead of wp-config.php

    SORRY! It’s all working perfectly now!

  171. Djuki 2005-10-26 / 11.07 pm

    
    Warning: Cannot modify header information – headers already sent by (output started at /home/djuki/public_html/djuki/blog/wp-content/plugins/polyglot/polyglot.php:1) in /home/djuki/public_html/djuki/blog/wp-admin/admin.php on line 10

    Warning: Cannot modify header information – headers already sent by (output started at /home/djuki/public_html/djuki/blog/wp-content/plugins/polyglot/polyglot.php:1) in /home/djuki/public_html/djuki/blog/wp-admin/admin.php on line 11

    Warning: Cannot modify header information – headers already sent by (output started at /home/djuki/public_html/djuki/blog/wp-content/plugins/polyglot/polyglot.php:1) in /home/djuki/public_html/djuki/blog/wp-admin/admin.php on line 12

    Warning: Cannot modify header information – headers already sent by (output started at /home/djuki/public_html/djuki/blog/wp-content/plugins/polyglot/polyglot.php:1) in /home/djuki/public_html/djuki/blog/wp-admin/admin.php on line 13

    I have this errors after instaling new version of this plygin. Can u hel me ?

  172. malyfred 2005-10-27 / 12.35 am

    djuki> You have obviously left some characters before <?php when you were editing polyglot.php. This can be even just UTF-8 BOM. You should use UTF-8 compliant editor where you have to turn the BOM off.

  173. Djuki 2005-10-27 / 11.21 am

    No i did not left caracters before

  174. Djuki 2005-10-27 / 11.24 am

    No i dod not lef some characters before php

    Warning: session_start(): Cannot send session cache limiter – headers already sent (output started at /home/djuki/public_html/djuki/blog/wp-content/plugins/polyglot.php:1) in /home/djuki/public_html/djuki/blog/wp-content/themes/Blue_Radiant/index.php on line 3

    I use sessions in mz blog, can thet be problem.

    And i use windows-1250 charcter coding.

  175. Erik 2005-11-01 / 11.43 pm

    I’m having some trouble with this plugin. I have uploaded the .mo files to the /wp-includes/languages/ directory, so that should be ok, and the other files needed (I think anyway, I uploaded the files in the downloade zip to the plugins directory, and it shows up in the admin panel).
    I added this piece of code to the php files,
    ', '', '', '');
    }?>

    but nothing happens. I’ve translated one post, but when I click the flag I get the post without my translation again. Do I have to add more code, did I add it in a wrong way or could I have made any other mistake? I’m not that sure just where to add it in the templates, but I have added it anyway.

  176. Erik 2005-11-01 / 11.47 pm

    Oops, the code didn’t show up very well.

    ‘, ”, ”, ”);
    }?>

  177. Erik 2005-11-01 / 11.49 pm

    Sorry, please delete that… anyway it was the code you provided above, after:
    If you put to your index.php (and single.php, search.php etc.) in your themes something like this:

  178. malyfred 2005-11-02 / 12.22 am

    Erik> It seems that you have set $polyglot_settings['lang_rewrite'] = true; haven’t you?

    Turn it off and let me know.

  179. Tomkun 2005-11-02 / 1.41 pm

    Is there a way of getting this to work with the folding page menu plugin? I tried that and it appears broken (It displays both languages). I guess it would be a simple fix for those with a talent at this sort of thing, but unfortunately, I am not one of them!

  180. malyfred 2005-11-02 / 2.36 pm

    Tomkun> Send me a link to that plugin and I’ll check it.

  181. Erik 2005-11-02 / 11.12 pm

    Thanks malyfred, I had. I turned it off and now it works alright. Just one thing though, now it shows up like a vertical list below the title of the post. Can you tell me how to take away the list-thing and put it on the same line as the title?

  182. malyfred 2005-11-02 / 11.51 pm

    Erik> Use:

    .inlinetitle ul {display: inline;}

    in your CSS file or call the function for generating of this list without list tags:


    <?php if(function_exists('lp_other_langs')) {
    //display existing language versions of the post
    lp_other_langs(' ',' ', ' ', ' ', ' ');
    }?>

  183. IImage Browser | skriker 2005-11-03 / 12.11 am

    [...] Polyglot [...]

  184. IImage Gallery | skriker 2005-11-03 / 12.14 am

    [...] Polyglot [...]

  185. Tomkun 2005-11-03 / 3.30 am

    OK, here’s the link…
    http://www.webspaceworks.com/resources/cat/wp-plugins/30/
    If you can get it to work, I will be forever in your debt!

  186. malyfred 2005-11-03 / 1.45 pm

    Tomkun> Try to replace:

    $page_tree[$page->ID]['title'] = $page->post_title;

    in fold_page_list.php

    with:

    $page_tree[$page->ID]['title'] = apply_filters('the_title', $page->post_title);

    I haven’t tested this fix but it should work.

  187. Erik 2005-11-03 / 11.59 pm

    Thanks again, works good now.

  188. Tomkun 2005-11-04 / 1.32 am

    Thanks so much, that works perfectly. You are indeed a superstar.

  189. Thomas Augustsson 2005-11-06 / 6.07 pm

    I got really excited when I read about this plugin but I cant download it. Neither the original link or the mirror seem to be able to provide the file for me. Can anyoune mail or point to another source for the file so I can evaluate the plugin, it could be just what I am after.
    Thanks!

  190. Steven Greenwood 2005-11-07 / 7.12 pm

    I also had the “Warning: Cannot modify header information” error

    Solution: Use a UTF-8 editor like SuperEdi (http://www.wolosoft.com/en/superedi/)
    I was using Notepad

  191. malyfred 2005-11-07 / 7.21 pm

    Djuki> You can use Win-1250 as you want, but polyglot.php (and the rest of WP) is saved in UTF-8. So try to use Steven’s suggestion and edit polyglot.php with SuperEdi.

  192. Steven Greenwood 2005-11-08 / 1.05 pm

    malyfred, I am having trouble with the rewrite, that you describe in the polyglot.php. i.e.
    RewriteRule ^(.*)/xx/?$ /$1?lp_lang_view=xx [QSA]

    I have added:
    RewriteRule ^(.*)/de/?$ /$1?lp_lang_view=de [QSA]e
    to my .htaccess.

    I am using the standard Permalink Structure:
    /%year%/%monthnum%/�y%/%postname%/
    However the ‘deutsch’ link still resolves to:
    fluxmedia.de/?lp_lang_pref=de&page_id=6
    any ideas?
    thanks

  193. malyfred 2005-11-08 / 1.44 pm

    Steven Greenwood>
    Have you set:

    $polyglot_settings['lang_rewrite'] = true; ?

    I’m not allowed to use mod_rewrite on my webhosting so I cannot test it:(

  194. Steven Greenwood 2005-11-08 / 3.07 pm

    Yes, looks like this:
    $polyglot_settings['lang_rewrite'] = true;

    RewriteRules look like this:
    RewriteRule ^(.*)/de/?$ /$1?lp_lang_view=de [QSA]
    RewriteRule ^(.*)/en/?$ /$1?lp_lang_view=en [QSA]

  195. malyfred 2005-11-08 / 8.52 pm

    Steven Greenwood> Re-download polyglot.zip because I’ve added some code related to this issue.

    I think that the main problem is in the RewriteRules… WP is using now a complicated system or generated rules and you should add more rules than just two and these should be more sophisticated. I cannot help you with this because I’m not allowed to use mod_rewrite on my server:( Try to ask your admin for help.

  196. trevor 2005-11-09 / 12.36 am

    This is a great plugin, but I’d just like to follow up Diego’s point of 10/4/2005. He’s having the same problem I’m experiencing: turning on the plugin overrides the localization choice of the administration interface, imposing English. Is there any way to use the plugin without doing this?

  197. trevor 2005-11-09 / 12.41 am

    Sorry for the stoopid question, just realised the answer was below D’s query. Thankyou…

  198. PDLib Blog » Bienvenidos! 2005-11-10 / 12.59 am

    [...] Postear en varios idiomas Technorati Tags: PDLibBlog Tags [...]

  199. MoebiuZ 2005-11-11 / 8.39 am

    Hi malyfred!

    I have found 2 little problems in Polyglot.

    If you click over a categorie (translated with tags) in the Title bar of the navigator you see:

    TitleTtle

    If you do same clicking over the title of a post, then you get in the title bar:

    TitleTitle

    There is any solution for that?

    You can see the problem here.

    Thx

  200. MoebiuZ 2005-11-11 / 8.41 am

    In the first example I mean

    lang_enTitle/lang_en lang_xxTitle/lang_en

  201. Daniele 2005-11-11 / 4.07 pm

    I have a problem
    because I installed Chen press to have an editor
    but If I write the code:
    prova

    when I save It has coverted in:
    prova

    so the plugin don’t work

    If I desactive chen press it goes
    have you any suggestion?

    DANIELE

  202. malyfred 2005-11-12 / 4.07 pm

    Daniele> If you know PHP at least a bit – then you can switch from <lang_xx> to and it will work fine. But you have to rewrite few lines in the polyglot.php.

  203. malyfred 2005-11-12 / 4.20 pm

    MoebiuZ> Find this code:


    if (is_single() || is_page()) {
    $title = strip_tags( $posts[0]->post_title );
    $title = apply_filters('single_post_title', $title);
    }

    in template-functions-general.php to:


    if (is_single() || is_page()) {
    $title = $posts[0]->post_title;
    $title = apply_filters('single_post_title', $title);
    $title = strip_tags($title);
    }

    I haven’t experienced such error when selecting category.

  204. Daniele 2005-11-14 / 6.04 pm

    Thank you
    I have desactived Chen Press
    then I’m going to find another editor (what do you use??)

    Your plugin is ideal for a multilanguage blog

    I have only a little problem

    some flags doesn’t want to appear:

    http://www.ottonovedue.com/wordpress/

    have you any ideas about?
    Thanks Daniele

  205. Daniele 2005-11-14 / 6.05 pm

    and then
    I’am italian how can I set my language to default

  206. malyfred 2005-11-14 / 7.18 pm

    Daniele> Open polyglot.php and you’ll see the answers to all your questions. You have to edit:

    $polyglot_settings['default_lang']

    and add

    $polyglot_settings['flags']['xx']
    $polyglot_settings['trans']['xx']

    for languages that are not specified yet.

    The most of languages are missing because I don’t know how they are called. E.g. “Portuguese” in Portuguese:) And also some people would prefer to have Brazilian flag for Portuguese instead of Portuguese flag etc.

  207. Daniele 2005-11-15 / 11.00 am

    Great

    Thank you very much
    in the next days I will try to insert yor plugin in other part of my blog

    Daniele

  208. Pierre 2005-11-15 / 12.16 pm

    Very nice plugin, but I have 2 problems (I’m 100% newbie, though):

    1. I’m unable to implement the language picker in index.php. Somehow the post’s title disappears and my sidebar is pushed to the bottom (I’m using the default template, by the way).

    2. I was able to put the language picker on my sidebar, but it looks like the selection is not kept in memory. Example: I’m on the homepage, I select “french”. The posts display in french, as expected. Now I click on a post’s title and in “post view” (or whatever you call it), the post is still in french. BUT if I now click on my blog’s title to go back to the main page, the posts are displayed in the default language again (instead of french).

    Any help would be much appreciated.

    P.S. As a sidenote, can I install the plugin within a subfolder of the plugins folder? All of my plugins are in the root “plugin” folder and it’s getting confusing. + can I do the same with all plugins (i.e. install them in their separate subfolder)?

  209. malyfred 2005-11-15 / 1.58 pm

    Pierre> Let’s start from the end – yes, you can install plugins in the subfolders.

    2. The selection is saved in cookie so there could be problem with settings in your browser or collision with some other plugin (don’t you use some caching plugin?)

    1. This is strange – send me a link to that page.

  210. Daniele 2005-11-15 / 3.41 pm

    It’s very strange

    the setup of my wordpressblog is in italian language but when I active your plugin It return in english

  211. Pierre 2005-11-15 / 4.47 pm

    Thanks for your quick reply, malyfred!

    1. Language selection using sidebar:

    I’m using the following other plugins:
    Adhesive
    Event Calendar
    Registered Only
    Subscribe2
    iimage browser (now deactivated)
    (and of course Polyglot)

    I deactivated iimage browser, because it doesn’t work properly (I suspect my company browser doesn’t accept javascript and this is the reason it doesn’t work).

    2. Language selector within index.php:
    Where exactly should I paste this code?
    ‘, ”, ”, ”);
    }?>

    I’m sending you testuser account credentials by mail, as well as my index.php prototype which doesn’t work.

  212. malyfred 2005-11-15 / 8.36 pm

    Daniele> Because Polyglot takes over the language settings… you should read Comment #206 more carefully.

    It also depends on your browser language settings because Polyglot respects the main language set in the browser as your prefered one.

  213. Thomas 2005-11-15 / 8.54 pm

    Hi! The plugin works wonderful. Merci!

    I have merely some remaining problems with the PAGE titles. There is no problem if I use OrganizationsOrganisationen but it does not understand my changes in the po/ mo file (which works fine with hte categories, e.g. wp_list_pages).

    Any idea?

    Cheers, Thomas

  214. Thomas 2005-11-15 / 8.56 pm

    ups, OrganizationsOrganisationen refers to

  215. Thomas 2005-11-15 / 8.58 pm

    last trial: lang-tag

  216. malyfred 2005-11-15 / 8.59 pm

    Pierre> I’ve checked your site and everything works fine!

    When you pick from the language offer in the sidebar – then the selection should be saved in the user’s cookie and he gets content in this language until he selects another one. It works for me so you should check your browser’s cookie settings.

    Also the languages offered for every post work fine. When you pick from this offer it just shows the post in selected language but this choice is not saved!

    And to answer your last question from your e-mail – Comments #85+86

    The only strange thing is that you have turned off $polyglot_settings['lang_change_locale']. Any special reason to serve french content surrounded by english “garbage”:)?

  217. malyfred 2005-11-15 / 9.08 pm

    Thomas> Page titles can be translated only with <lang_xx>One version</lang_xx> <lang_yy>Another version</lang_yy>

    I’ve explained why category names must be translated in .mo file in “How to translate categories” paragraph of the post.

    btw. these characters – < and > must be written like &lt; and &gt; :)

  218. Atun tun tun… » Probando plugin Polyglote 2005-11-15 / 10.49 pm

    [...] – Se llama Polyglot y lo he descubierto gracias a Zootropo que lo recomendó en un comentario. – Estoy aún probándolo y modificándolo un poco para que aparezca a mi gusto – Haré un mini-how-to para los que quieran ponerlo en su blog, dado que, aunque en la página oficial del plugin lo explican bastante bien, seguro que hay alguno que no tiene ni idea de PHP ni de inglés, así que lo haré por esas almas cándidas – No es nada complicado escribir en dos idiomas, se hace al escribir la propia entrada. Ya vereis ya.. – Aun no sé como aparece en la sindicación, tendré que investigar más. [...]

  219. Weblog de WiZaRd_ » Weblog (casiquasi) bilinge 2005-11-16 / 5.12 am

    [...] Debido a una entrada en la que Manuls admita que le haba entrado el gusanillo de hacer su weblog bilinge, al estilo de David Martinez, yo haca un comentario en el que deca que a m tambin me gustara hacerlo (en valenciano y castellano), al cual Zootropo contesta aconsejndonos usar el plugin Polyglot. [...]

  220. Daniele 2005-11-16 / 10.34 am

    I precise

    Your plugin goes very well

    I changed the parameters in 206

    but I use wordpress with a localization file in Italian .mo
    and when I active your plugin the language of administration and blog returns in english

    if I desactive the plugin every part returns in Italian

    I use a bowser in italian and I have tried to use all cod

  221. Pierre 2005-11-16 / 11.57 am

    Thanks a lot for your support, Martin. What do you mean by:
    “The only strange thing is that you have turned off $polyglot_settings['lang_change_locale']. Any special reason to serve french content surrounded by english “garbage”:)?”

  222. Pierre 2005-11-16 / 11.58 am

    I checked the code and it is set this way:
    $polyglot_settings['lang_change_locale'] = TRUE;
    What’s wrong?

  223. malyfred 2005-11-16 / 3.43 pm

    Daniele> That must be just some mess in your language settings. Check twice wp-config.php and polyglot.php if everything is all right. Don’t forget that your language files must be called “xx.mo” e.g. “it.mo” and you have to set your default language also as xx not xx_XX.

  224. malyfred 2005-11-16 / 3.46 pm

    Pierre> So you don’t use french localization file (fr.mo)!

  225. Daniele 2005-11-16 / 4.23 pm

    Thank you Malyfred

    localization file called it_IT
    so you plugin didn’t know it

    now it is all good
    thank again

  226. Pierre 2005-11-16 / 5.35 pm

    Ah! No, I’m not using a localization file (I’m not that far yet). ;-)

    Concerning the language setting using the sidebar, it’s apparently not a cookie problem (I’ve checked and cookies do work). If I refresh my browser window, I get the correct result, so it rather appears to be related to the way Wordpress’ cache works. Any idea if there’s a workaround? Perhaps disable caching in WP? Don’t know how to do that, though.

  227. malyfred 2005-11-16 / 7.25 pm

    Pierre> WP doesn’t have any caching system by default and your page works for me so…

    Try to change language of this page in the sidebar – does it work?

  228. Atun tun tun… » Polyglot: Mini-how-to 2005-11-16 / 10.29 pm

    [...] Polyglot es un plugin para Wordpress que te permite escribir las entradas en varios idiomas y dar la oportunidad al usuario de leerlo en uno u otro idioma. Tu tienes que escribir la entrada en los dos idiomas y cada una entre unas etiquetas específicas que explicaré más adelante. [...]

  229. » Polyglot 2005-11-23 / 3.25 am

    [...] Ja esta funcionant com volia el plugin per wordpress Polyglot, el traductor manual. Aquest plugin esta basat en el que feia servir abans jo, el Language Picker. Les millores que te es que detecta els tags en els post’s i si no escrius en un idioma no et possara la disponibilitat d’aquest. [...]

  230. Denis 2005-11-23 / 7.36 pm

    Thanks for the plugin.
    Please add ‘he’ (for Hebrew) to knownlangs array in get_users_pref_lang() function (line 408). Without it, even if user has set her default lang to ‘he’, it has no effect by default.

    An additional question: does anyone has an idea how to switch stylesheets based on the chosen language? For Hebrew and Arabic, it is a necessity, as one needs to set the correct reading order for various elements (ltr, rtl).

    Thank you, Denis.

  231. malyfred 2005-11-23 / 11.48 pm

    Denis> Thank you. I’ve added ‘he’ to the list of recognised languages.

    I think that comment #133+134 could help you with ltr and rtl.

  232. » I tu, quins plugins tens?Y tu, ¿que plugins tienes? 2005-11-25 / 1.58 am

    [...] – Polyglot: El plugin per traduir, ja comentat [...]

  233. martin 2005-11-25 / 3.29 pm

    Hi,I am trying to install this useful plugin but it seems i am kinda stucked with my work. I have 3 languages to chose on my web . Translation of works fine but category list contains numbers of posts made in category under different language so menu looks really messy. Any suggestions?

  234. martin 2005-11-25 / 3.32 pm

    ….and actually i noticed that posts have the same problem: text of post is not shown but other information such a date of post, name are still presented:(

  235. malyfred 2005-11-26 / 2.12 am

    martin> I’ve checked your page and it seems fine. Only the post content has just one language version.

  236. martin 2005-11-26 / 10.25 am

    malyfred::. the problem is that in the sidebar, under catigories I have translated items with __ and after switching language to other one, they still have tracks in menu (they are still presented somehow: number of posts in translated category what does not belong to switched language). It seems 2 b filtering problem…..but I can not force code make right job:(

  237. Polyglot for B2Evolution 2005-11-26 / 12.20 pm

    Polyglot for B2Evolution

    Polyglot is a plugin for B2Evolution blogging system.

    It allows one to write multiple language version of the same post. It utilizes a set of tags in form <lang locale=”en”></lang>.

    Polyglot for B2Evolution has its roots in plugin w…

  238. malyfred 2005-11-26 / 1.32 pm

    martin> When you use gettext (= __ function) you have to have all translations in appropriate .mo files.

    Try the second method wiht <lang_xx> tags.

  239. martin 2005-11-26 / 7.48 pm

    hm…ok, I will try to explain again: I made two posts on my site- one in russian and the other one in estonian including lang_xx tags. Now when I’m switching on estonian language I c the post in estonian aaaaand the name of post in russian insead of my desire displaying only content of estonian page…

  240. martin 2005-11-26 / 9.16 pm

    malyfred::. do not bother urself with answer….solved my problem:) thnx 4 nice plugin;)

  241. schilke 2005-11-29 / 5.03 pm

    thx for that useful plugin. Just wanted to post a small note on an issue I would probably loose out of sight:
    Line 18 of your code
    “$polyglot_settings['trans']['de'] = ‘deutch’;”
    better should read
    “$polyglot_settings['trans']['de'] = ‘deutsch’;”
    I haven’t finnished work with my implementation yet but I will let you know when.

  242. malyfred 2005-11-29 / 6.14 pm

    schilke> Danke schön! Ich spreche Deutsch sehr schlecht:(

  243. MFA 2005-11-29 / 10.14 pm

    Malyfred, thank you so much for making this plugin – it’s great and much appreciated!

    I have implemented in on my (first ever!) website with a bit of hacking and slashing here and there. There is just one little problem left. I cannot get “it” to remember the language setting for my front page.

    My website structure is like this:

    (root)
    wordpress/ (normal wordpress dir)
    index.php

  244. MFA 2005-11-29 / 10.15 pm

    (my last comment was cut off) here’s the rest:

    (root)
    wordpress/ (normal wordpress dir)
    index.php

  245. MFA 2005-11-29 / 10.16 pm

    (sorry for spaming your comments :-( :-( )

    (root)
    wordpress/ (normal wordpress dir)
    index.php — my own front page

    in my index.php i just call lang_picker_repect_more() on the text that I want translated.

    I have nailed the problem down to that $lp_lang_pref is empty in my front page. Could you please provide me with a hint on how to solve this problem?

    The site is not online yet so unfortunately I can’t provide you with a link.

    Thanks in advance!

  246. malyfred 2005-11-30 / 1.27 am

    MFA: Do you use “polyglot_list_langs” function? Do you have all languages in “$polyglot_settings['knownlangs']“?

  247. MFA 2005-11-30 / 10.11 pm

    Malyfred;
    Yes I use polyglot_list_langs(true) to show flags. Also the $polyglot_settings[’knownlangs’ are set up correctly. Everything works: Blog, pages, categories, titles etc., they are all translated correctly and every page “remembers” what language I choose when pressing a flag – Except: Everytime I go to host/index.php I get the default language and $lp_lang_pref is 0

  248. malyfred 2005-12-01 / 1.53 am

    MFA> Does it work for you on my page? When you change the language in the sidebar and then return to the main page?

    Because the selection in the menu means that the language code xx (lp_lang_pref=xx) is saved in cookie and all pages should be translated into that language then. Your problem could be in the configuration of your browser.

  249. MFA 2005-12-01 / 7.42 pm

    Malyfred,
    Yes your site works fine – but your site is also different from mine in the way that your front page is part of the wordpress “package” – mine is not.
    mine:
    wwwroot/
    index.php — my special front page
    wordpress/
    wordpress/index.php — wordpress front page with blog
    wordpress/wp.php
    etc.

    Maybe it’s because that my index.php front page do not access the cookie data? I tried to copy your cookie code from polyglot.php (line 93-102) into my index.php but that didn’t help.
    I don’t know too much about PHP (even if I have a programming background) maybe I should just get into it :-)
    I’ll try to get my site online soon – would probably make it much easier.

    I really appreciate that your are taking time out to help me like this. Thanks.

  250. malyfred 2005-12-01 / 11.55 pm

    MFA> You should be able to get what you need when you call “polyglot_get_lang()”

  251. Akela 2005-12-02 / 3.54 pm

    Thanks for Plugin!
    I’ve read about translate-categories.php plugin in comments, but have problem locating it.

  252. malyfred 2005-12-02 / 10.51 pm

    Akela> translate-categories plugin does’n exist anymore because it was implemented in Polyglot.php (this is mentioned in “Fixes”). “How to translate categories” is described in the post.

  253. Akela 2005-12-03 / 9.40 am

    Malyfred> Thanks for clearing this.
    May i ask more : echoing category title (in archive.php )results in string:
    русскийenglish

    wp_list_cats() is translated correctly. All other content (so far) also. Did i miss something?
    Thanks in advance!

  254. malyfred 2005-12-03 / 12.36 pm

    Akela> I guess you use “single_cat_title()” function for displying category’s name and WP doesn’t have any hook for this function. Polyglot cannot filter the title automatically here:( It’s a bug in WP.

  255. Akela 2005-12-03 / 9.04 pm

    Thanks , I was ready to die in front of my computer trying to solve the issue….
    Btw, thanks for Iimage-gallery !

  256. TyskJohan's random thoughts 2005-12-06 / 5.06 pm

    En flerspråkig blogg, ja…

    Det kan ju verka lite pretentiöst att skriva på flera språk i en och samma blogg. Samtidigt är det ganska naturligt för mig, framför allt när jag skriver om saker som har väldig mycket med ett land (och därmed språk) att göra – och väldigt…

  257. Jamal Abdou Karim Bengeloun 2005-12-08 / 12.01 am

    Thanks a lot for this great plugin.
    I have just started playing with it. You should clarify the part when you say : “they should be renamed to xx.mo” – I tried that renaming it to say fr.mo (two letters), but in fact one should leave it at fr_FR.mo otherwise you get an error.

  258. malyfred 2005-12-08 / 3.10 am

    Jamal> NO, you have to rename it to ‘fr.mo’. I guess you should read “known issues” again and set:

    define('WPLANG', 'fr')

    and not ‘fr_FR’. Also all ‘knownlangs’ must be ISO codes – two letters again.

  259. martin 2005-12-08 / 1.50 pm

    Malifred>here is my site where i’m tryng and trying to put Ur plugin…everything works fine except switching between langugaes ‘coz it switches only for a main page and goes back to default every time when i wander trough menu:( and it seems not to be coockies problem

  260. martin 2005-12-08 / 1.52 pm

    forgot to add url http://martinos.glwb.info/

  261. malyfred 2005-12-09 / 12.33 am

    martin> That’s because you use lp_lang_view instead of lp_lang_pref. “view” is for individual post and doesn’t save anything to the cookie. Recomended is using “polyglot_list_langs” function as is mentioned in the post.

  262. martin 2005-12-09 / 9.14 am

    ok i’ve added polyglot_list_langs string to my sidebar code but the problem still presists: i can change language for particular post or page but not for whole site even using lp_lang_pref….

  263. martin 2005-12-09 / 10.22 am

    dunno how but i solved my problem again:)

  264. Mort 2005-12-09 / 11.30 pm

    After hours of head-scratching, I discovered (in one of the comments above) that you must edit the wp-config.php file before copying the .mo files into the languages directory.

    You must change:

    define (’WPLANG’, ”);

    to:

    define (’WPLANG’, ‘en_US’);

    Otherwise you will get the following error:

    Fatal error: Cannot instantiate non-existent class: cachedfilereader in /wp-includes/wp-l10n.php on line 72

    I think it would be great if you could explain a little more about installing .mo files in the main article above.

    Thanks very much for the plugin!
    Mort

  265. malyfred 2005-12-09 / 11.38 pm

    Mort> If you had read “known issues” in the post properly you would have known this fact from the very beginning…

    And btw it should be
    define (’WPLANG’, ‘en’)
    as is described in the post as well. Otherwise the automatic language detection doesn’t work.

  266. Mort 2005-12-11 / 12.15 am

    Thanks again malyfred! Sorry I missed that! I have another question though.

    Is it possible to translate the titles of the Link Categories into multiple languages? I tried putting the title strings into my .mo files, but that had no effect, and i also put the tags into the titles, but they just show up in the rendered pages.

  267. malyfred 2005-12-11 / 4.27 am

    Mort> Bad news is that you cannot translate link names with Polyglot because WP doesn’t have any hook that could be used for it… sorry:(

  268. Michael 2005-12-13 / 10.56 am

    Hi malyfred

    Thank you very much for a great plugin :-))
    I am all smiles, since that is exactly what I was looking for.

    I have compiled the install information in a small textfile and I will email it to you; maybe you can post it for newbies…

  269. alle 2005-12-13 / 12.32 pm

    Hi malyfred,
    I’ve the same problem as martin
    had in comment #259.
    I use polyglot_list_langs in sidebar, but the issue persists.
    I have not been able to solve it out (as martin did). :(

  270. malyfred 2005-12-13 / 12.40 pm

    alle:: And everything works fine on my site? Also link would be nice so I could test it on my own.

  271. alle 2005-12-13 / 12.49 pm

    It seem working all right on your site. I’ve no address, since I’m working on a local server.
    Here it seems that the “$posts[0]->ID;” element in polyglot_list_langs function is empty.

  272. malyfred 2005-12-13 / 1.38 pm

    alle:: Don’t care about that value it’s just little workaround to allow changing language even when user is browsing deeper in the web structure without redirecting him to the front page. The only important parameter is “lp_lang_pref=xx” where xx is the ISO code that should be saved to a cookie then.

  273. alle 2005-12-13 / 2.04 pm

    malyfred> OK, setting are all OK. The cookie is set. The browser is properly configured for the base language selection. The URL generated by your functions report the right parameter for the language selection but it is “truncated” at the end, it does not containt the proper page_id parameter. So it always goes to the site’s main page. :(

  274. Hiddenson 2005-12-13 / 2.32 pm

    Hi,

    While I see the use of your plugin, I fail to see the difference between Polyglot and Language Picker. Both seem to do the same thing, am I correct?

    Thanks for pointing out any distinctions I may have missed.

  275. malyfred 2005-12-13 / 3.50 pm

    Hiddenson> Have you read the post at all? This IS completely based on Language Picker but I’ve fixed many bugs and added support for translating categories and automatic detection of visitor’s prefered language and lot of other stuff. LP doesn’t seem to be maintained anymore:(

  276. malyfred 2005-12-13 / 3.57 pm

    alle:: I wouldn’t be worried about it as this function is mainly for selecting prefered language and if you want to switch the language of particular post you should use “lp_other_langs”. I have played around with the ID parameter in last two months quite a lot but I’ve failed as there is no “bullet proof” way how to get the ID:( Try to insert sidebar.php to the single.php (and others) after the WP loop. It could help.

  277. Hiddenson 2005-12-13 / 4.39 pm

    Malyfred,

    It was a misunderstanding, no need to get picky here! I read your post as well as Language Picker, but I was not sure whether your plugin would work as standalone or if it needed Language Picker preinstalled. “Based on…” could mean anything, a credit to an author or a requirement.

    That being said, I finished the implementation of your plugin and it’s working perfectly, so thank you very much for your work and for releasing this to the community :)

  278. malyfred 2005-12-13 / 4.53 pm

    Hiddenson:: ok, ok:) I’m just anwsering to too many questions and should be a bit more patient I guess.

    But good to know that this plugin helps to other people.

  279. Wordpress mehrsprachig (Schröttle’s Krimskrams…) 2005-12-13 / 8.50 pm

    [...] Seit heute ist mein Wordpress zweisprachig Nicht das das jetzt heisst, dass alle Posts automatisch in Deutsch und Englisch erscheinen werden – das hängt ganz von meiner Laune ab… Die Möglichkeit danke ich fred und seinem fabelhaften Plugin ‘polyglot’ – zu finden unter ‘Wordpress polyglot’ im Google oder direkt: http://fredfred.net/skriker/index.php/polyglot; die Anleitung ist nicht ganz so einfach zu durchschauen, aber nach drei Stunden war klar wie es läuft und wie es mit dem Template usw. zusammenspielt; und so nebenbei hab ich auch noch gelernt, wie Wordpress die lokalisierung macht.   [link] [...]

  280. hlb’s weblog » Multilingual Blogging 2005-12-15 / 2.52 am

    [...] 查找一番後,知道我目前用的WordPress系統有這些選擇,就決定在自己筆記型電腦試試看(我在iBook裡跑了個測試用的http://hlb.yichi.dev/)。結果發現堪用的只有polyglot。Multilingual雖然看起來比較完整,連管理介面都做了,可是裝起來實在問題一堆,不知道從何改起。如果最近有時間,就會開始好好玩polyglot吧。 [...]

  281. Hiddenson 2005-12-15 / 7.07 am

    Hello again,

    As per comment #267, does this mean there is no other solution for translation of link names than hard coding them in the template? Ugly, I know, but it could be ok if there were links added rarely, if ever.

    Right now, I use get_links(), and I don’t see another solution than the one above… What do you think?

  282. malyfred 2005-12-15 / 1.38 pm

    Hiddenson:: Well, you could write your own function for printing link list (just copy and paste get_links() code with calling Polyglot inside).

    I’ll do that one day if there will be still no hook for links in WP 2.0.

  283. TyskJohan’s random thoughts » Blog Archive » Fiddling with the blog 2005-12-16 / 6.57 pm

    [...] I might give the other contestant, polyglot, a whirl also. [...]

  284. yuri vieira 2005-12-16 / 11.53 pm

    Hi malyfred
    This is a great plugin. But – like the others – I have a problem. My language is brazilian portuguese “pt_BR”, but when a set that value in polyglot.php I got an error. When I put only “pt”, my post disapear, and rest only the flags (spanish and portuguese). I have tried to change the wp-config and the pt_BR.mo to “pt” but doesn’t work. What I need to do? Thank you so much.
    Yuri

  285. malyfred 2005-12-17 / 12.09 am

    yuri vieira:: Set “pt” everywhere, rename the file to pt.mo and use <lang_pt> in the post. Everything will be fine.

  286. yuri vieira 2005-12-17 / 12.31 am

    Thank you, malyfred. I will try. :)
    {}’s

  287. gleamynode.net » Blog Archive » 유용한 WordPress 플러그인들 2005-12-17 / 8.33 pm

    [...] Polyglot – 다국어 블로그 운영의 필수품. (URL Rewrite 에 약간의 버그가 있어 소스를 수정해야 했습니다.) [...]

  288. Anleitung: Wordpress für Internet Marketer (Schröttle’s Krimskrams…) 2005-12-27 / 1.39 am

    [...] 9. Polyglot: Macht Wordpress zum Mehrsprachigen CMS mit Hilfe einfacher Tags, die in den Posts verwendet werden… [...]

  289. Michael 2005-12-27 / 2.56 pm

    Hi Fred
    Polyglot gives a link for the translate flag of an item that reads like this: /?p=&lp_lang_view=
    Can this be changed so that the permalink for the chosen language is returned, i.e. //
    Same goes for the function that switches between language preferences for the site:
    instead of /?lp_lang_pref=xx&p= just render / and process the parameters in the background???
    thank you very much for your feedback.
    Michael

  290. malyfred 2005-12-28 / 2.41 pm

    Michael:: Well, I have done a lot of work about this but WP 1.5 is a bit buggy when it comes to permalinks. You can achieve this behaviour manually if you understand .htaccess file. Let’s hope that Wordpress 2.0 works better.

  291. Marc 2006-01-01 / 10.03 pm

    2.0 stable is out! :-) There is a hook now to also translate pages, isn’t there?

    Marc

  292. TyskJohan 2006-01-02 / 10.32 am

    Hey!

    Will there be an update to 2.0? The permalink hack at least doesn’t work any more…

  293. TyskJohan’s random thoughts » Blog Archive » WordPress 2 2006-01-02 / 3.45 pm

    [...] Not much changed on the surface, but quite a lot below said surface. For instance, parts of the Polyglot plugin seems to have quit working. [...]

  294. Sjors 2006-01-03 / 1.56 pm

    The problem that i found is that in the normal text editing mode i can’t use the tag anymore because the texteditor they use only supports known html tags.. the hack could probably be in suporting the lang-tag, but i wasnt able to find out where.. anyone any idea?

  295. Yannick Lefebvre 2006-01-04 / 2.57 am

    I switched to the plain text editor to be able to use Polyglot correctly in Wordpress 2.0. However, even with this done, I am still having problems with language tags used in the post title.

    I was using language tags in the title so that people would see a post’s title in their selected language. However, now, I just get an error about badly formed XML in the page with these tags in the post title. It would be very good to get this correctly as well.

    I have posted this additional incompatibility on the Wordpress Codex.

  296. Alex Kessaris 2006-01-04 / 9.01 am

    I think that the polyglot plugin has excellent potential. I have noticed however that the syntax

    does not always work because of the capitalization of the letters in the link.

    additionally, I would like to know what would be the best way to get the address of the current page in the event that it is not a blog entry?

    For instance a contact page.. supposing the

    URI is http://www.domain.ca/contact

    the links of pages become cut off:

    http://www.domain.ca/?lp_lang_pref=pt&page_id=

    which causes the site to return to the home page. This is an annoyance more than a bug.. but is there a way that the current page can be accessed in the event that it is not a blog entry? for instance using a permalink? What I’m trying to say is.. is it possible that the polyglot behaviour can extend to pages as well as blog entries?

  297. Alex Kessaris 2006-01-04 / 9.05 am

    sorry my uri’s got cut off.. the first one is

    http://www.domain.ca/contact

    and then the polyglot links on the page do not retain the link to the contact page, but rather appear as follows:

    http://www.domain.ca/?lp_lang_pref=pt&page_id=

    which returns to the main page rather than the contact page. Is there a way to get the current page and use it in the polyglot links? Thank you.. sorry for the double comment!

  298. Alex Kessaris 2006-01-04 / 9.06 am

    A follows

    http://www.domain.ca/?lp_lang_pref=pt&page_id=

  299. Alex Kessaris 2006-01-04 / 9.08 am

    oh cripes! somebody delete these I am so sorry! how embarassing! like this:

    http://www.domain.ca/?lp_lang_pref=pt&page_id=

    when it should be:

    http://www.domain.ca/contact/?lp_lang_pref=pt

    Thank you! sorry!

  300. malyfred 2006-01-04 / 3.42 pm

    Marc:: What do you mean by “translate pages”? You can translate pages and their titles in exactly same way as post since 22.9.2005

  301. malyfred 2006-01-04 / 3.45 pm

    TyskJohan:: I hope that WP developers have rewritten the whole permalinks part (it was quite buggy) and I’ll have a chance to implement it properly. Give me some time to find out what’s new.

  302. malyfred 2006-01-04 / 3.46 pm

    Sjors:: I’ll fix this soon and you’ll be able to use in WYSIWYG.

  303. malyfred 2006-01-04 / 3.51 pm

    Yannick Lefebvre:: What exactly doesn’t work for you? Here http://fredfred.net/wp/ is my testing blog and everything works fine…

  304. malyfred 2006-01-04 / 4.11 pm

    Alex Kessaris:: Fixed, download the latest version. It doesn’t keep the permalink structure yet, but I am working on it.

  305. Alex Kessaris 2006-01-04 / 9.36 pm

    Hello again!@
    There is such a function in wordpress called get_permalink() that seems to work quite effectively. It would be good to like check if we are outside the blog chronology (ie in a page) and then use this function I think..

    Thank you for all your effort! this is gonna be great.. but we must also thank the author of language picker I feel.

  306. Alex Kessaris 2006-01-04 / 9.45 pm

    You’re right. it’s still buggy. Sorry for all the multiple posts! There must be a good way to track the current url though!

  307. Marc 2006-01-05 / 12.07 am

    malyfred: It meant to say “page menu entries”, sorry. :-)

  308. malyfred 2006-01-05 / 1.28 am

    Marc:: well, I still don’t understand what’s the problem:( It works with “wp_list_pages” function.

  309. Enno 2006-01-05 / 2.52 pm

    Hello malyfred,

    first of all, “A happy new year!” and thanks for devellopping this great plugin.

    However, polyglot seems not to work with permalinks.
    If I enter into title e.g.
    EinsOne
    I see “Eins” or “One” for the post title depending the choosen language.
    But the permalink is “einsone”.
    Is there any possibility to show “eins” for the German version and “one” for the English (better for search engines)?
    That would be great!

    Thanks in advance & have a nice day.

  310. Enno 2006-01-05 / 2.56 pm

    Sorry, it’s me again, it has to be:
    If I enter into title e.g.
    <lang_de>Eins</lang_de>
    <lang_en>One</lang_en>

  311. malyfred 2006-01-05 / 3.16 pm

    Enno:: That’d be nice but as far as I know this is not possible in WP. There’s still a lot of work about permalinks and Polyglot waiting for me so maybe I’ll find some workaround.

  312. TyskJohan 2006-01-06 / 2.52 pm

    Regarding Enno’s point. The Redirect Old Slugs plugin may give you a pointer as to how this could probably be done.

  313. Jobo 2006-01-06 / 6.06 pm

    I’ve read all the reactions here. But I’ve tried to do everything, but I always get this error:

    Warning: Cannot modify header information – headers already sent by (output started at /local/web/websites/1672429154/www/web/index.php:2) in /local/web/websites/1672429154/www/web/wp-content/plugins/polyglot.php on line 95

    Help! What’s the reason?

  314. malyfred 2006-01-06 / 9.17 pm

    Jobo:: Do you get the same error even when you use unmodified polyglot.php?

  315. nemo 2006-01-07 / 12.13 am

    Hi Malyfred,
    I’m using Polyglot and Character Map and they work like a charm on my blog! Thanks for the great plugins!
    I couldn’t figure out yet a solution to make bilingual RSS work with redirected feedburner, but I’m working on it.
    Keep up the good work!

  316. malyfred 2006-01-07 / 1.35 am

    nemo:: Thank you! and if you found the way how to pass some parameters through the Feedburner – let us know. I am using two separate feeds on Feedburner for that purpose at the moment.

  317. Enno 2006-01-07 / 9.38 pm

    malyfred, I had a look at plugin of #312. It could be useful, … but you know better your code. ;-)
    Till then two other questions please:

    1) I like to use polyglot for comments too.
    Therefor I have to allow the HTML-tag <lan_xx> into comments.
    [xx has of course to be replaced by the needed language]

    Easy to find, I have to add
    ‘lan_xx’ => array ()
    into “$allowedposttags” in wp-includes/kses.php

    [ Would be nice if you add it too ;-) ]

    Now a visitor can add multilingual comments, … BUT …
    … how do I show his comment?
    If I want to replace a simple text like “good evening”, I write
    _e(’good evening’)
    and translations will be searched in “.mo” files.

    But here, content will be showed by
    comment_text()
    It’s impossible to write
    _e(comment_text())

    So what do I have to do???

    2) The same problem for other functions. How do I use gettext for them?

    Thank you so much.

    BTW: Did you change your .css file? Your bakground is nearly black now and the grey font is difficult to read.
    If I adjust more brightness for your page, my monitor is too clear for all other pages.

  318. Enno 2006-01-07 / 9.58 pm

    Oups, I forgot to ask how to show dates in different formats.
    Is there another possibility than using the following code that I wrote for index.php?
    Can I use polyglot for
    the_time()
    or
    the_date() ???

    <?php
    $lan = polyglot_get_lang();
    if ($lan==”fr”) {
    $time = “d/m/Y”;
    }
    if ($lan==”de”) {
    $time = “d.m.Y”;
    }
    if ($lan==”en”) {
    $time = “Y-m-d”;
    }
    ?>
    <small><?php the_time(’l, ‘.$time.’ | H:i:s’); echo ” (”; the_author(); echo “)”; ?></small>

  319. malyfred 2006-01-08 / 1.03 am

    Enno:: At first, look at http://fredfred.net/skriker/index.php/monitor-calibration/ and then try “look&feel” section in the menu.

    Back to the Polyglot.

    ad comments)
    Re-download the latest version and your visitors can write comments in different languages immediately using:
    [lang_xx] bla bla [/lang_xx]

    test – next paragraph is either in czech or english – according to your language selection:

    english text

    ad time)
    I have added new functions related to the time and date. Basically – just set the time and date formats for each language.

  320. Enno 2006-01-08 / 7.33 pm

    malyfred,

    thanks again for you quick help, that’s great!

    1) I changed to "Pale Skriker". ;-)

    2) All is OK with polyglot and comments, cool!

    3) I set time and date formats, but your functions don’t work. So, I wrote another one that’s even more flexible. What do you think of replacing yours? Here comes the code:


    function polyglot_datetime($l='l', $d='', $pc=''){
      global $post,$comment,$lp_lang_pref,$polyglot_settings;

      if ( $l=='l' ) {
        $l = "l, ";
      } else {
        $l = "";
      }

      if ( $d=='' ) {
        $d = $l.$polyglot_settings['date_format'][$lp_lang_pref]." ".$polyglot_settings['time_format'][$lp_lang_pref];
      } else {
        $d = get_settings('date_format');
      }

      switch ($pc) {
      case 'post_date':
        $pc = $post->post_date;
        break;
      case 'post_modified':
        $pc = $post->post_modified;
        break;
      case 'comment_date':
        $pc = $comment->comment_date;
        break;
      default:
        $pc = date("Y-m-d H:i:s",time());
        break;
      }

      $the_date = mysql2date($d, $pc);
      echo $the_date;
    }

    4) Sorry, but I found a little bug. If you show a limited number of posts in "index.php", you’re on page 2 or 3 or … and you change language by global flags (function "polyglot_list_langs"), you’ll go back to homepage (page 1).

    5) How can I use Polyglot for Blogroll and other plugins like Recent Comments (http://blog.jodies.de/archiv/2004/11/13/recent-comments/)?

    6) Are there already news about polyglot and permalinks (#309, #312)? Please inform us…

  321. malyfred 2006-01-08 / 8.06 pm

    Enno:: the_date(), the_time() and comment date and time functions definitely work – you can see it on this web. Don’t forget that if you pass formating parameter to any of these functions – it’s superior to the Polyglot settings.

    I prefer using standard functions and changing their results through the hooks.

    4)Fixed

    5) Comment #4

    6) Using custom fields doesn’t sound good for me at the moment. You can use above mentioned plugin if you want but I’d prefer some nicer way.

    I have complete solution for generating permalinks (instead of lp_lang_view etc.) and adding all necessary rules for them but it doesn’t work at the moment with “index.php” in it, because of some WP security limits. You can use permalinks with .htaccess file if you set it manually.

  322. Enno 2006-01-08 / 11.49 pm

    Hello malyfred, you’re really helpful, thank you so much!

    3) The functions definitely work. It was my mistake, sorry.

    > I prefer using standard functions and changing their results through the hooks.
    You’re right. But how do you show
    a) date & time of “post_modified”
    b) actual date
    ???
    You have to add other functions “post_modified” and “actual_date”, isn’t it?

    4) Super, thanks!

    5) Sorry, I really don’t understand how to do. :-(

    In order to test, I have filled “Link Name” and “Short description” of a new link with
    en

    These link is called in the sidebar by
    get_links_list()

    So, I want to obtain in my blogroll
    fr if French is choosen,
    de if German is choosen and
    en if English is choosen.

    But I get
    en

    Comment #4 doesn’t help me because I don’t know how to use the function.
    No result if I put
    lang_picker_respect_more(get_links_list())
    in my sidebar or if I add to polyglot.php
    add_filter(’get_links_list’, ‘lang_picker_respect_more’,1);

    Please help me.

    6)
    > but I’d prefer some nicer way.
    What’s your way? Adding all necessary rules to .htaccess?
    I don’t understand what to do to solve my problem of #309.
    Is it enough to set in polyglot.php
    $polyglot_settings['lang_rewrite'] = true;
    and to add to .htaccess the lines
    RewriteRule ^(.*)/de/?$ /$1?lp_lang_view=de [QSA]
    RewriteRule ^(.*)/en/?$ /$1?lp_lang_view=en [QSA]

    Would you please give my detailed steps or could you tell me where to find a description?!
    Or could you explain exactely your way?

  323. Enno 2006-01-08 / 11.59 pm

    Sorry, replace (of course without spaces before and after lan_xx):

    In order to test, I have filled “Link Name” and “Short description” of a new link with
    en
    == BY ==
    [ lang_fr ]fr[ /lang_fr ][ lang_de ]de[ /lang_de ][ lang_en ]en[ /lang_en ]

    AND

    But I get
    en
    == BY ==
    [ lang_fr ]fr[ /lang_fr ][ lang_de ]de[ /lang_de ][ lang_en ]en[ /lang_en ]

  324. malyfred 2006-01-09 / 2.11 am

    enno::

    ad 3) Ok, ok – here is your function:
    polyglot_time($d = '', $time = '')

    First parameter is optional formating string and second is time either as an unix timestamp or WP’s timestamp (like $post->post_date etc.)

    example:
    echo polyglot_time('', time() );

    ad 5) ahhhh – step by step:
    1] visit http://codex.wordpress.org/Template_Tags/get_links

    2]
    echo lang_picker_respect_more( get_links(blabla...,false) );

    ad 6) I’ve found workaround (still doesn’t work with pages:( for permalinks using “index.php” you can test it now. Just set “lang_rewrite” to true.

    If you don’t want to have “index.php” in your permalink structure you have to find proper rules that you have to add to the .htaccess. Continue: http://www.google.com/search?client=opera&rls=en&q=mod_rewrite+rules&sourceid=opera&num=50&ie=utf-8&oe=utf-8

  325. Jobo 2006-01-09 / 10.51 am

    Malyfred: a reaction on your question no. 314:

    yes, the same error….:(

  326. Jobo 2006-01-09 / 11.30 am

    I see that the error is:

    if ($_GET["lp_lang_pref"]) {
    setcookie($polyglot_settings['lang_pref_cookie'], $_GET["lp_lang_pref"], time() + 30000000, COOKIEPATH);
    $lp_lang_pref=$_GET["lp_lang_pref"];
    }

    But why??

  327. malyfred 2006-01-09 / 12.44 pm

    Jobo:: Download the latest version of Polyglot and install it. Then turn all other plugins off and you’ll see. If it works, turn other plugins on one by one until you find witch one is the problematic one.

  328. Sjors 2006-01-09 / 5.05 pm

    hey thanks for making an update so fast :) i will try it tomorrow

  329. Jobo 2006-01-09 / 5.43 pm

    Thanks Malyfred.
    It works.

    Only de titles on the pages doesn’t translate.

  330. malyfred 2006-01-09 / 5.53 pm

    jobo:: Comment #203 or use [] tags

  331. Enno 2006-01-10 / 1.49 am

    3) Thank you very much, you’re great!
    I propose a little modification in order to allow choice of output format: only date, only time or both.
    By calling function on pages, you even don’t need third parameter, i.e. e.g. for output of date and time of modified post:
    <?php echo polyglot_time(”, $post->post_modified); ?>

    Here comes my code. Feel free to put it into the next version:

    function polyglot_time($d = ”, $time = ”, $dt = ”) {
      global $lp_lang_pref,$polyglot_settings;

      switch ($dt) {
      case ‘d’:
        $dt = $polyglot_settings['date_format'][$lp_lang_pref];
        break;
      case ‘t’:
        $dt = $polyglot_settings['time_format'][$lp_lang_pref];
        break;
      case ‘dt’:
        $dt = $polyglot_settings['date_format'][$lp_lang_pref]." ".$polyglot_settings['time_format'][$lp_lang_pref];
        break;
      default:
        $dt = $polyglot_settings['date_format'][$lp_lang_pref]." ".$polyglot_settings['time_format'][$lp_lang_pref];
        break;
      }

      if($d == ” && isset($polyglot_settings['time_format'][$lp_lang_pref]) && isset($polyglot_settings['date_format'][$lp_lang_pref])){
        $d = $dt;
      }

      if(strpos($time, ‘-’)){//trick to find you if we’ve got "mysql time" or unix timestamp
        $time = mysql2date($d, $time);
      }
    else {
        $time = date($d,$time);
      }

      return $time;
    }

    5) Thank you again for your effort and patience! That works fine.
    But there remains a problem (#317,2 and #320,5) that seems to me the same as Jobo’s: How do you apply Polyglot to general functions?
    Take for example Jobo’s problem that title is not translated. In "archive.php",
    <?php echo single_cat_title(); ?>
    displays original code with [ ] tags.
    Do we have to use your function "lang_picker_respect_more" and how to do so?

    6) Thanks, I’ll try later, have no more time today.

    7) NEW:
    When I’m in archives, e.g. "2006/01/01/" and want to change global language, I turn back to homepage.
    Perhaps same fix to use as for #3210, 4) ?!

    8) NEW:
    Last but not least [and perhaps even not last... ;-)] a little question:
    I handle three languages (fr, de, en). If I enter only one or two of these languages in my posts and change global language to non-existing one, I’ll see no content.
    Is there any possibility to show a standard text for absent language?

  332. malyfred 2006-01-10 / 3.53 am

    enno::
    ad 3) Download the latest version – there is “polyglot_date” that allows you to combine results as you want.

    ad 5)
    echo lang_picker_respect_more( single_cat_title() );

    Just pass the text to the fucntion and you get proper language version back.

    ad 7) and also in many other cases (author, archive of any kind, categories…) you should get used to it. Don’t forget that Polyglot is still using “workaround” and is not actually really implemented into WP permalink system. That’s because of limitations of WP at the moment. That means that not all “issues” can be solved. Of course they can be, but then the code is getting too complicated and any future developement will be much slower due to too many “workarounds” inside. Let’s hope I’ll find some nice solution one day.

    ad 8) if default language version is present then it’s used. If not – no content, that’s the feature not bug. Switch to swedish on this web to see this feature in action.

  333. Jobo 2006-01-10 / 10.30 am

    Thanks for your reaction Malyfred.
    But I’ve read comment #203 but it’s no solutions for me…:(

    An other idea maybe?

  334. malyfred 2006-01-10 / 1.25 pm

    jobo:: as I said – use: [lang_xx] instead of <lang_xx>

  335. Enno 2006-01-11 / 12.48 am

    First, I really like to compliment you on your quick reaction and work.
    Thanks a lot!

    3) OK, your short function is better. Thanks, it works.

    5) I use as test category name (of course without spaces after [ and
    before ]) the following
    [ lang_fr ]fr[ /lang_fr ][ lang_de ]de[ /lang_de ][ lang_en ]en[ /lang_en ]

    After having modified in archive.php
    <?php echo single_cat_title(); ?>
    to
    <?php echo lang_picker_respect_more(single_cat_title()); ?>
    I always get
    [ lang_fr ]fr[ /lang_fr ][ lang_de ]de[ /lang_de ][ lang_en ]en[ /lang_en ]
    instead of "fr", "de" or "en".

    I think, it’s jobo’s problem, too. What happens and how to fix?

    7) OK, so let’s wait and see… ;-)
    In the meantime I tried something. I replaced in your function "polyglot_list_langs" line
    <?echo get_settings('siteurl')."/?lp_lang_pref={$value}"; ?>
    by
    <?echo $_SERVER['REQUEST_URI']."/?lp_lang_pref={$value}"; ?>

    It works fine for all cases (author, archive of any kind, categories…)
    but one:
    If you just changed language, you’ll get your
    URI plus "/?lp_lang_pref=xx&p=y". So if you change directly to another language you’ll get
    URI plus /?lp_lang_pref=xx&p=y" plus "/?lp_lang_pref=xx&p=y".
    Perhaps you can fix it by using preg_replace() ?!

    8) I see and understand that’s a feature. You’re right.
    But it only works if I entered text in default language.
    I wonder if there’s a possibility to show a standard text if the default language version doesn’t exist.

  336. malyfred 2006-01-11 / 1.20 am

    Enno::
    ad 5) http://codex.wordpress.org/Template_Tags/single_cat_title

    and you should consider using Codex more often.

    ad 7) Yes, it works but I am looking for complete “permalink only” solution. First signs can be seen on this page. Look at the language offer in the menu.

    ad 8) What do you mean as a “stadard text”?

  337. Enno 2006-01-11 / 1.43 am

    ad 5) & 7) I’ll look this evening…

    ad 8) The display of e.g.
    “Sorry, article not available in this language”
    Of course for all used languages.

    CU L8er & good night.

  338. Yannick Lefebvre 2006-01-11 / 3.03 am

    Sorry for taking so long to reply. The problem only appears when I had language tags in my title and then put a link to the comment page at the end of the post. I am using permalinks which add the post title in the URLs. In this particular situation, this made an error appear in the permalinks when the tags appeared.

  339. malyfred 2006-01-11 / 3.56 am

    Yannick:: I’m sorry but I still don’t understand:( I went through all parts of you web but the only visible “problems” for me (except my “poor french”:) is that you have post slugs and page titles in both languages. Slugs were always like that – because you can manualy edit the slug when you are editing the post. Page title in both languages is old WP bug but you can fix it with using [lang_xx] instead of <lang_xx>

    You must upgrade to the latest version of Polyglot to be able to use [lang_xx].

    Maybe I don’t understand due to my poor english… I am sorry if so:(

  340. Enno 2006-01-11 / 11.44 pm

    9) NEW:
    Hello, I just tested new version 0.97 with settings:

    $polyglot_settings['lang_rewrite'] = false;
    $polyglot_settings['i_have_manually_edited_my_htaccess_file'] = false;

    Unfortunately, there are some bugs:
    - homepage
    On choosing global language "?lp_lang_pref=fr" is used and works well. But if you select directely another language, "&lp_lang_pref=fr"will be used and produces an error 404.

    - archives
    Nearly same error (? first use, & second use) but language doesn't change immediately, you have to click the flag a second time.

    5)
    > you should consider using Codex more often
    Sorry, I'll try so. Thanks for helping. By using
    <?php echo lang_picker_respect_more(single_cat_title('', false)); ?>
    it works, category name is now translated!

    7)
    Hmm, I think you tried to use it, but there are still bugs, see 9).

    8)
    Please let me know if you find a solution.

    Good luck and good evening.

  341. malyfred 2006-01-12 / 1.24 am

    enno:: ?/& bug is fixed now. test it.

    8) implemented. test it.

  342. Enno 2006-01-12 / 11.24 pm

    First of all, once again, thank you for your work.
    Please don’t understand my comments as negative criticism or push to advance.
    It’s in fact to encourage and help you.

    6)
    Are there any news concerning permalinks in different languages?
    At the moment, with settings of permalink structure without index.php but:
    /%year%/%monthnum%/%day%/%postname%.html
    and
    $polyglot_settings[’lang_rewrite’] = true;
    $polyglot_settings[’i_have_manually_edited_my_htaccess_file’] = true;

    and for each language in .htaccess
    RewriteRule ^(.*)/lang/xx/?$ /$1?lp_lang_view=xx [QSA]
    permalinks don’t change.

    But URI is changing, like on your page to "www.abc.com/lang-pref/xx/"
    By changing global language, I get an eror 404. Only by setting
    $polyglot_settings[’i_have_manually_edited_my_htaccess_file’] = false;
    it works on homepage. By choosing categories, it bugs.

    And why using "www.abc.com/lang-pref/xx/"?
    "www.abc.com/xx/" is shorter (and better for search engines) and used by international well known pages (e.g. http://www.apple.com/de/, http://www.apple.com/uk/, etc.)

    7)
    Thanks, it seems to work now.

    8)
    > implemented. test it.
    Thank you so much. Two remarks:
    a) If you want to show this "default message" (DM), you have still to enter
    [ lang_xx ][ /lang_xx ] into your article for absent language.
    Is there any possibility to show DM even if nothing is entered for absent language?

    b) If you wnat to show the DM for title too, you have to change your code from
    add_filter('the_title', 'lang_picker_respect_more',1);
    to
    add_filter('the_title', 'polyglot_filter_with_message',1);
    If you don’t, nothing will be shown in title.

    Another possibility of handling absent language version, is not to show at all the concerned article if it’s not available in global set language.
    What do you thing and is it possible to implement this, perhaps as option?

    9)
    > ?/& bug is fixed now. test it.
    Thanks, it seems to work.

  343. malyfred 2006-01-13 / 12.22 am

    enno::

    6) I cannot test it with .htaccess:( so…

    Using “lang-pref/xx/” instead of domain.com/xx/ is because second version will be confusing for rewriting rules (domain.com/postname/)

    Advanced users can help themselves anyway.

    8)
    a] I’m sure you don’t have to… Try again.
    b] I’d cosider this as a feature. Otherwise you’ll get the same message twice on the same page and there can be quite long text with explanation how to switch languages etc.

    To remove the post completely is easy but I don’t think it’s good solution because many people speak more languages and then you should let them know about other language versions of the post.

  344. Andries 2006-01-13 / 3.42 pm

    Thank you malyfred for this great plugin.
    Everything works exactly like you explain in your topic.

    Now a small question for somebody on this blog :
    how can I add a line to my .po file?
    I understand the whole proces, and I have “poedit” – but now I want to add a line with my custom translation of a category. I guess I really missed something.

    Many thanks

  345. Tantra 2006-01-13 / 4.49 pm

    Using Feedburner with Polyglot…

    This one is a technical post, malyfred wrote me as a reply on his Polyglot Wordpress plugin blog that I should let them know if I succeed in using his plugin with Feedburner.
    Finally I had some time to think on how to implement multilingual RSS with …

  346. Wurblzap 2006-01-14 / 1.39 am

    alle:: (and possibly others) — I had a similar cookie problem and made it work for me by replacing all occurrences of HTTP_COOKIE_VARS in polyglot.php by _COOKIE.

    Thanks for the plugin!

  347. Ama 2006-01-16 / 4.03 pm

    Thank you for this great plugin.
    It works fine in my blog, except for categories.
    I have the same problem as Andries, that is to say, how to add the translations of categories to my .po and .mo files with poedit.
    I cannot find it in the poedit help.
    Hope to get a suggestion or indication…
    Regards.

  348. malyfred 2006-01-16 / 4.41 pm

    Andries&Ama:: I usually add new lines to .po files in text editor because I haven’t found how to add new string translation neither…

  349. Ama 2006-01-17 / 1.26 am

    malyfred, thank you very much for the tip…

  350. Andries 2006-01-17 / 12.50 pm

    thank you malyfred, i’ll try that out

  351. Cezary Kobyliński 2006-01-17 / 2.12 pm

    Add to plugin getimagesize(); function to easy read width and size of flag images. Remember, that some server have file-access disabled when using absolute URL.

  352. Pete 2006-01-21 / 8.26 am

    Is there a readme installation guide for WP 2.0 for this plugin. Would love to see/read one if there is one to set it up.

    Please and Thank you.

  353. snaky 2006-01-21 / 11.48 am

    I found a bug in function lp_other_langs. There is two identical parameters in declaration of this function. The last $after parameter has to be $aft for example.
    So you have to modify the lines:
    $after = lang_picker($after); -> $aft = lang_picker($after);

    $other_langs .= $pre“.$foo.”$after”;//fred -> $other_langs .= “$pre“.$foo.”$aft”;//fred

  354. malyfred 2006-01-21 / 9.59 pm

    snaky:: It’s fixed since some time ago… but thank you for your bug report.

  355. malyfred 2006-01-21 / 10.03 pm

    Pete:: The installation is same for any version of Wordpress, you don’t need any special instruction for 2.0. Just unpack it to the “plugins” directory and activate it.

  356. Enno 2006-01-24 / 11.33 pm

    Hi malyfred, I was a little busy last time, sorry. I’ll test and write soon. CU and good night, Enno.

  357. René 2006-01-27 / 3.39 pm

    Hi,
    Thanks for doing a wonderful job developing and maintaining this plugin.
    I wanted to ask you (or anyone around reading this) if there is a version of the WordPress Default Theme somewhere that has all the English words getexted already? I was just thinking that I was probably not the first one tryin to make Polyglot handle this one correctly, so maybe there is an adapted version uploaded somewhere yet?

    Maybe it would be a good idea also to kind of maintain a list of themes that just work well with Polyglot (those that have the proper function calls already built in or at least the ones having everything gettexted); what do you think?

    Best wishes and regards,
    René

  358. Cezary Kobyliński 2006-01-30 / 8.14 pm

    It’s seems that the title of page isn’t translate. It’s a bug?

  359. malyfred 2006-01-30 / 9.00 pm

    Cezary Kobyliński:: Comment #203. I’ve suggested this fix to WP developers some time ago but nothing has changed:(

    Anyway, it should work fine without any hacking if you use [lang] tags instead of <lang>.

  360. sudcadred 2006-02-02 / 10.40 am

    I would like to share my know-how about permalinks (I am new to all these things and it took me two days to find out everything). If you use permlinks, there is file .htaccess located in your root directory. Many things is possible to do via this file, but what is important for us, it can translate links, for example, user will see in his browser address http://web/archives/6lang-pref/en/ – this is what we call permalink, but we define in .htaccess rule, how this address is changed on server side to http://web/archives/6?lp_lang_pref=en.

    What rule do we need for this? Very simple – only one line ( I placed it at the beginning of rules, but after RewriteEngine On and RewriteBase /):
    RewriteRule permlink reallink
    In our case it will look like this:
    RewriteRule ^(.*)lang-pref/en/$ /$1?lp_lang_pref=en [QSA]

    Let’s look closer at first parameter permlink (^(.*)lang-pref/en/$). First(^) and last($) character simply mean begin and end of string which should be translated. Next two characters .* are regular expression, and it means any string (. means any character in text, and * means any number of repetitions of previous character). These two chars are enclosed in round parenthesis, it means that it will be remembered as variable in value $1 (next parenthesis would be $2 etc.). Then follows string lang-pref/en/. Then Apache will know, that any address beginning with anything and containing substring lang-pref/en/ will be translated to second parameter (/$1?lp_lang_pref=en).

    $1 is remembered value http://web/archives/, so from this address http://web/archives/6lang-pref/en/ we get http://web/archives/6?lp_lang_pref=en.

    ————————————
    I would write also about Rewrite rule mentioned in comment 194:
    RewriteRule ^(.*)/en/?$ /$1?lp_lang_view=en [QSA]
    This rule generaly could work, but has one big disadvantage. If you use function polyglot_list_langs (as I use in my sidebar to set language globaly for all posts via cookie), part of address is wrong translated to lp_lang_view instead of lp_lang_pref. As a consequence the cookie will not be set, and random language in each post will be displayed.

  361. Dani Danczuk 2006-02-03 / 7.42 pm

    Error in my wp-blog-header.php
    Please? Help me!
    http://www.moon-drops.com/log

  362. malyfred 2006-02-03 / 10.16 pm

    sudcadred:: Thank you for your “mod_rewrite for dummies” it could help beginners to understand how it works.

  363. TyskJohan 2006-02-07 / 6.40 pm

    Here’s a snippet of code that goes deep into the internals of WordPress to finally fix support for in-URI language selection:

    function lang_from_qs () {
    $content = $_SERVER['REQUEST_URI'];

    if (preg_match('/^(.*)\/lang\/([a-z][a-z])\/(.*)$/i', $content, $matches)) {
    #FIXME: What about no trailing slash?
    #FIXME: Does it only occur at the end?
    #FIXME: Check only for defined languages?
    $content = $matches[1] . "/" . $matches[3];
    $_GET['lp_lang_view'] = $matches[2];
    }
    $_SERVER['REQUEST_URI']= $content;
    return;
    }

    add_action('init','lang_from_qs',1);

  364. Catbytes.org 2006-02-07 / 7.55 pm

    Bilingual – Tweetalig…

    Zoals je misschien gemerkt hebt, is per deze week de mogelijkheid erbij gekomen om bepaalde blogs in het engels te lezen. Niet alle blogs zullen meertalig worden, dat is teveel werk.
    Of het artikel ook in een andere taal beschikbaar is, is te zien aan …

  365. malyfred 2006-02-07 / 8.34 pm

    TyskJohan:: That’s a good idea how to avoid struggling with internal WP rewriting rules! Thank you!

  366. Peter Troxler 2006-02-08 / 2.02 pm

    There is a tiny bug in the plugin: the variable $after is used in lp_other_langs() for both the closing tag for each language entry and the closing tag for the list. I changed the closing tag for the list to $closelist.

    snippet of code removed by malyfred

  367. malyfred 2006-02-08 / 4.15 pm

    Peter Troxler:: This is fixed since some time ago, but thank you for your report.

  368. TyskJohan 2006-02-08 / 8.01 pm

    I don’t know what your release plans are, so I just wanted you to know that I am working on a version with some cleaned-up code but also improved settings/preference editing, based on the separate-screen, akismet style introduced in WP2.0. I doubt that this will be backwards-compatible, though…

  369. tkay 2006-02-10 / 3.23 am

    Just started working on a blog, thanks for a truly great plugin! Good job! One question though; is it just me or is it actually true that the browser language settings override the cookie set by the plugin for the preferred language? Because this makes no sense to me; there’s a great bunch of people who just don’t have a clue that they can implement this kind of a default setting in a browser. Shouldn’t the cookie set the preference over the browser?

  370. malyfred 2006-02-10 / 10.50 am

    tkay:: It takes your browser settings if there is no cookie yet. Then it takes value from the cookie.

    If it doesn’t work like that in your case something is wrong…

  371. Leo 2006-02-12 / 12.22 pm

    Hello Malyfred, thanks for your plugin. It’s really great, and i definitely need it. I just start to implement it, so at the very moment i’m translating posts only.
    All seems work as expected, except behaviour of setting language from cookie. On my site all posts are shown in browser preferred language, though wordpress_lang_pref cookie is set. I’ve tested it on two browsers with different preferred languages, and it seems that wordpress_lang_pref cookie aren’t read by browser.
    The problem can be that i have changed the theme a lot, and i don’t use sidebar.php in a single-post-view page?
    Also i want to clarify how to display different images according to preferred language. As a PHP newbie i can suggest that simplest way is to use if-then-else and polyglot_get_lang(). Any advises?

  372. malyfred 2006-02-12 / 2.03 pm

    Leo:: What version of PHP do you have? You can try to replace $_COOKIE with old and depreciated $HTTP_COOKIE_VARS if you have some old version of PHP.

  373. Leo 2006-02-12 / 7.19 pm

    I’m using PHP 5.1.1, and in output from phpinfo() i can see that $_COOKIE["wordpress_lang_pref919138a6ea403a63ba984e7f5dc515e5"] exists and is set. Maybe change $_COOKIE to $_REQUEST may help?

  374. Esther 2006-02-13 / 12.38 pm

    Hello Malyfred,
    Thanks for the great plugin :-)

    I have a template which uses wp_get_archives(’type=postbypost&limit=10′) for showing recent posts on the sidebar. What filter could I add to the plugin so it translates that too?
    thanks for your help.

  375. malyfred 2006-02-13 / 2.45 pm

    Esther:: There’s no hook in that function so you cannot filter the result at the moment without hacking the WP code:(

  376. tkay 2006-02-13 / 10.19 pm

    Seems like me and Leo have the same problem; the cookie is set but for some reason it is either not read or something else causes the blog to fall back to the browser language preference. I have worked on this for a while but so far no luck. The blog reverts back to the browser preference if you click on well basically anything. Weird! Could this be another UTF-8 vs. Notepad -conflict? I have edited the polyglot.php in SuperEdi but everything else in Notepad… I’ll have to check that…

  377. tkay 2006-02-13 / 10.32 pm

    Okay. Works. I have 0.99 version of this plugin and there was

    // Initialization stuff

    $lp_lang_pref = (isset($HTTP_COOKIE_VARS[$polyglot_settings['lang_pref_cookie']])) ? trim($HTTP_COOKIE_VARS[$polyglot_settings['lang_pref_cookie']]) : FALSE;

    which i changed to

    // Initialization stuff

    $lp_lang_pref = (isset($_COOKIE[$polyglot_settings['lang_pref_cookie']])) ? trim($_COOKIE[$polyglot_settings['lang_pref_cookie']]) : FALSE;

    Now there’s no problem. No idea how it got there since i havent’s changed that… thought from Malyfreds post that it was the other way around!! Perhaps Leo can get his blog working with this mod as well!!

  378. nukid 2006-02-14 / 12.18 pm

    I have no idea how to make this plugin work for my site. I have installed the plugin.

    And what next? I don’t know.

  379. Leo 2006-02-14 / 1.05 pm

    tkay:: It’s nessesary to track down how variable is taken from cookie and where it is passed. Maybe, this problem caused by some mismatch between written and read cookie’s name?

    BTW, I’m using WP 1.5.

  380. tkay 2006-02-14 / 2.35 pm

    Leo:: I changed the $HTTP_COOKIE_VARS in polyglot.php to $_COOKIE (two references, first line under // Initialization stuff). This solved my problems. I’m using WP 2.01.

    I guess this is not approved by Malyfred since that post of mine is gone? But this worked for me.

  381. Leo 2006-02-14 / 3.58 pm

    Problem fixed, i’ve missed comment #346.

  382. Leo 2006-02-16 / 10.59 am

    tkay:: your posts were hidden, thanks for your help though :)

  383. malyfred 2006-02-16 / 12.20 pm

    tkay&leo&ALL Sorry guys, this is actually my fault because I haven’t updated the polyglot.zip with the latest version:(

  384. RP 2006-02-17 / 6.38 pm

    I have a problem with this plugin.
    at main page:
    http://www.rp.bestcatalog.net/tango/

    language picker doesn’t work – it produces wrong links,

    but if we move to archives or about section it works…

    I’m using “polyglot_list_langs” function to display languages.

    What’s wrong???

  385. malyfred 2006-02-17 / 7.08 pm

    RP:: Set the $polyglot_settings['lang_rewrite'] to “false”

  386. Leo 2006-02-18 / 1.08 am

    Please delete my previous comment.

    I have found a bug (at least i think so). wp_list_cats() generates for each category unordered list item, where text in <a>…</a> is translated, but text in <a title=”…”> is not translated. Text in title always in default language. You can check it here, at your blog.

  387. Leo 2006-02-18 / 1.29 am

    sorry for a lot of posts

    I mean, than category name in <a title="…"> is not translated, “View all posts filled under ” is translated correctly.

  388. RP 2006-02-18 / 11.02 am

    Thx. It works.
    So simple.

  389. محسن حميدي 2006-02-18 / 7.21 pm

    سلام
    فقط خواستم ازتون تشكر كنم
    تون هم به زبان شيرين فارسي
    دلتون بسوزه كه نميتونين بفهميد چي نوشتم
    هر چند شوخي ميكنم
    موفق باشيد
    يا علي

  390. Tara Long 2006-03-09 / 10.12 am

    I’m a bit embarrassed by this newbie question, but nobody mentioned and I am confused:

    How do I get the two different language versions
    in my posts?

    I assumed the plug-in would add another textfield to the edit page/post tool where I could paste the translation in. I tried inputting the tags into the Page Content text area but they were stripped out.

    Thanks in advance, TLL

  391. Escritor 2006-03-10 / 11.21 pm

    Hello
    I’m trying to make an archive list by language as I have an archive list by authors and by date in my blog:
    http://blog.karaloka.net

    By authors:

    document.getElementById('authors').style.listStyle="none";
    document.getElementById('list_authors').style.display="none"; // collapse list
    function toggle(list){
    var listElementStyle=document.getElementById(list).style;
    if (listElementStyle.display=="none"){
    listElementStyle.display="block";
    }
    else{ listElementStyle.display="none";
    }
    }

    By date:


    document.getElementById('archives').style.listStyle="none";
    document.getElementById('get_archives').style.display="none"; // collapse list
    function toggle(list){
    var listElementStyle=document.getElementById(list).style;
    if (listElementStyle.display=="none"){
    listElementStyle.display="block";
    }
    else{ listElementStyle.display="none";
    }
    }

    What functions I must to use for a list by languages? What elements? polyglot_list_langs? lang_picker?
    Thank you!
    Regards.

  392. jordi 2006-03-12 / 6.50 am

    Do you have the catalan flag? How can I program it to work with catalan language too?

  393. malyfred 2006-03-12 / 8.14 pm

    Tara Long:: You write all language versions in one text field but separate them by adding special tags around them.

    Example:
    <lang_en>English text</lang_en>
    <lang_fr>French text</lang_fr>

  394. malyfred 2006-03-12 / 8.24 pm

    Escritor:: polyglot_list_langs prints out the list of languages that are in $polyglot_settings['knownlangs'] array.

  395. malyfred 2006-03-12 / 8.32 pm

    jordi:: I don’t think there is a catalan flag in default installation but you can easily add it to the “polyglot_flags” directory and its name to the $polyglot_settings['flags'] array.

  396. docflo 2006-03-13 / 11.09 am

    since i upgraded to wp 2.0.2 the plugin is broken in every browser but safari. in safari everything works as it should, in firefox etc i get
    Fatal error: Cannot instantiate non-existent class: cachedfilereader in /…/wp-includes/wp-l10n.php on line 67
    what to do?

  397. docflo 2006-03-13 / 11.23 am

    ok, i set wplang to ‘en’ in my wp-config.php and the problem disappeared. strange that before (with 2.0 and 2.0.1) everything worked smoothly without that modification.

  398. Torben 2006-03-16 / 9.01 pm

    Hi, nice plugin :-)
    But I also have to problems. The first is the same as in post 17. I want to display the flag symbol at the same line like the date and category, but don’t know how. It was earlier said to add “display: inline” to post-title, but I don’t have that one, maybe because I’m using K2 as a theme? (you can see it here: http://www.tkuehle.de).
    The second thing: When I click on the flag it opens the post in a new window (like when you click on the title). Is there a way to change the language but stay on the actual page (like the example on this page)?

    Hope someone can help me, Torben :-)

  399. malyfred 2006-03-16 / 11.53 pm

    Torben:: The easiest way for you is to move <ul>… </ul> with languages into the <small class=”metadata”> </small> and then put:

    .metadata ul {
    display: inline;
    }

    into your style.css file.

    For some other info read comment #182.

    I’ve visited your web and all links seem to open in the same window. There is actually no reason why different language versions should be opened in the new window.

  400. Torben 2006-03-17 / 1.25 am

    Thanks a lot, it works now :-)
    Found out that it works best if i move the code into (like you said) and then remove the and tags.

  401. Torben 2006-03-17 / 1.28 am

    Hmm, don’t know why your blog swallowed parts of my post now… I wanted to say “..move the code into the ’small’ tag and remove the ‘ul’ and ‘li’ tags.

  402. steven 2006-03-19 / 10.52 pm

    just tested the nextpage tag
    together with Polyglot in WP2 and
    it doesn’t seem to work.

    For example:

    some text on page 1

    some text on page 2

    Text auf Seite 1

    Text auf Seite 2

    It would seem that the nextpage tag
    is counted before Polyglot, thus
    displaying too many pages.

  403. malyfred 2006-03-20 / 1.53 am

    steven:: <!–nextpage–> should work if you use it this way:

    some text on page 1
    Text auf Seite 1
    <!–nextpage–>
    some text on page 2
    Text auf Seite 2

  404. aeronova 2006-03-21 / 11.08 pm

    Hi, thank you for your awesome plugin.
    I’ve been trying to use it, but it seems not working for me. :( I’m sorry to bother you with my trivial problem, but I’d apprecite it if you could give me some advice.

    Bascially, I installed your plugin, and edit ‘index.php’ of my default theme to add the following code at the end of ‘index.php’ as you said.

    ‘, ”, ”, ”);
    }?>

    Then, I edit ‘polyglot.php’ to add ‘en’ and ‘fr’ for a testing purpose.

    Lastly, I wrote a temporary posting as follows.

    Written in English…
    Written in French…

    However, It turns out your nice plugin is not working correctly as you can see at my blog: home.pusan.ac.kr/~aeronova/blog

    I’m not familar with either wordpress and php. I hope you could save me. Thank you.

  405. malyfred 2006-03-21 / 11.43 pm

    aeronova:: Both language tags are there so the plugin looks deactivated.

    Also try [ lang_xx] version of the tags.

    Don’t forget to set WPLANG (e.g. define(’WPLANG’, ‘en’);) in your wp-config.php.

  406. aeronova 2006-03-22 / 7.42 am

    Thank you for your timely response.
    My problem has gone just ‘Activate’ your plugin. I thought it was already activated, since ‘Action’ was set to ‘Activate’, but it turned out it was not. Thank you again. :)

  407. Seville 2006-03-23 / 12.54 am

    Hey Fred,

    your plugin is awesome! But I don’t get one thing to work. The
    problem Torben had before #399 with opening the post in a new
    window, I want the the post changes in the index.php. I also read
    #182 but it didn’t really help. Like you said I modified the css
    file and I put the

    between the small tags. And then it didn’t show a flag at all. And
    what do you mean by move … with languages…. I don’t
    have anywhere?

    It would be great if you can explain excatly where to put it in the
    index.php

    Thanks in advance

    Seville

  408. Vincent Prat 2006-03-23 / 1.35 pm

    Hi,
    I don’t know if this has been reported before but I found a bug in polyglot_the_date, I changed a != into a == in the ‘if’
    [code]
    function polyglot_the_date($the_date, $d, $before = '', $after = ''){
    global $post,$lp_lang_pref,$polyglot_settings;

    if( isset($polyglot_settings['date_format'][$lp_lang_pref]) && $d=='' && $the_date=='' ){
    $d = $polyglot_settings['date_format'][$lp_lang_pref];
    $the_date = $post->post_date;
    $the_date = $before.mysql2date($d, $the_date).$after;
    }
    return $the_date;
    }
    [/code]

  409. malyfred 2006-03-23 / 2.40 pm

    Vincent Prat:: This is not a bug this is a desired behaviour of original “the_date” function in WP.

    It returns the date of the post, only if it is different from the date of the previous post. So there is empty string passed to the polyglot_the_date function sometimes and in that case we are supposed to return empty string as well.

    But thank you anyway.

  410. malyfred 2006-03-23 / 3.49 pm

    Seville:: It seems that everything works now on your web. Do you know what was the reason for opening post in the new window?

  411. Vincent Prat 2006-03-23 / 4.39 pm

    ok, cool. Thanks for your plugin by the way, I use it happily on my site.

  412. Vincent Prat 2006-03-23 / 7.11 pm

    Hi,

    I’m getting problems using the feature to say “There’s no version of this post in this language”.

    I guess this has to do with the fact that wordpress always add some [P] and [/P] tags to the post (working with wordpress 2.0.2).

    So the post is in fact never considered empty …

    How do you get around this ?

    It might be possible to just check if the translated text contains html tags only instead of checking if it is actually empty ?

    Any thoughts ? Maybe I am doing something wrong.

  413. Seville 2006-03-23 / 9.31 pm

    Hey Fred,

    thanks for your reply, I don’t know if I made it clear. It’s not opening in a new window but it’s opening in a new page. If you go to href=”http://www.schroettle.com/?p=12&lp_lang_view=en and change the language the post is still opening in the index.php page, when I click on my page http://www.derfrison.com to change the language it is opening in the single.php page. How can I make it to open in the same page (index.php).

    Thanks a lot

    Seville

  414. andlaz 2006-03-23 / 11.23 pm

    Hi,

    I’m having a problem with the plugin after added 5 new languages on the [knownlangs]. The error is

    “Warning: Cannot modify header information – headers already sent by (output started at c:\inetpub\wwwroot\jukebox\blog\wp-content\plugins\polyglot.php:1) in c:\inetpub\wwwroot\jukebox\blog\wp-admin\plugins.php on line 22″

    It happened right at the point after I added the date format for the new languages.

    Any help is appreciated.

  415. uzbek 2006-03-24 / 6.35 am

    Great plugin. Loving it… That is exactly what I was looking for.. Thanks for the work you have done…

    2andlaz, try to add error_reporting(0); in the begining of your script. That might help…

  416. malyfred 2006-03-24 / 12.54 pm

    andlaz:: Comment #172

  417. malyfred 2006-03-24 / 1.08 pm

    Seville:: I don’t see any difference from intentional behaviour. If you click on …&lp_lang_view=xx you get the content as single.php in both cases.

    Only on schroettle.com when you click on …&lp_lang_pref=xx you always get home page but that’s a bug that should have been fixed since some time ago. (problem with getting post ID in different versions of WP)

  418. malyfred 2006-03-24 / 1.45 pm

    Vincent Prat:: I’ll look at it but try to play around with position of <lang_xx> tags as there should be version that works.

    Testing for html tags wouldn’t work because <img> is also “just” a tag…

  419. Seville 2006-03-25 / 3.51 am

    Oh I see it now,ok, Schroettle.com is the same like I have, but I would like to have it like you. When you click on your website on the flag, the new language version is showin in the index.php and that’s what I want. Or am I wrong?

    Sorry for bothering you

    Seville

  420. malyfred 2006-03-25 / 2.41 pm

    Seville:: You are wrong. My single.php just looks the same as index.php, that’s it:)

  421. Daydream 2006-03-26 / 7.01 am

    Hi,
    Just want to show you one possible way I’ve found to show bilingual content…

    voila!

  422. Daydream 2006-03-26 / 7.03 am

    <?php
    $lan = polyglot_get_lang();
    if ($lan==’fr’) {
    include ‘homefr.php’;
    }
    if ($lan==’en’) {
    include ‘homeen.php’;
    }
    ?>

  423. maira 2006-03-26 / 3.35 pm

    Hello, malyfred and everybody!
    I have just downloaded the plugin and am testing it on a local installation. I have many things to say but, after reading each and everyone of these comments I’ll just write the most urgent (I think): I have a fully gettexted default theme (Kubrick)and its POT file. Where can I send it? I also can help gettexting others.

    A different matter, but related to this: the standard way to i18nalize a theme is calling load_theme_textdomain() and placing the theme.mo inside the theme folder. Would Polyglot work well this way?

    Thanks, malyfred, for this grat piece of code. I’ll come back soon with more questions and proposals.

    Maira

  424. malyfred 2006-03-26 / 7.13 pm

    maira&ALL:: Send the gettexed theme to my e-mail (you can find it in the footer of every page) and I’ll offer it for download.

    I haven’t tried load_theme_textdomain() yet as there are very very few (if any) themes ready for that. But I add it to my ToDo list.

    First on the list is the implementation of full xx_XX language codes – neccessary for smooth co-operation with other i18n stuff.

  425. markus 2006-03-26 / 9.43 pm

    Hi malyfred,

    is there a way to get the “lang_xx”-tags working in the Custom Fields?

    Thanks.
    Markus

  426. markus 2006-03-26 / 10.25 pm

    here’s my workaround:

  427. maira 2006-03-26 / 11.16 pm

    Ok, then I’ll take the calls out of the code and send only the default theme’s files, as I suposse the text strings will have to be included in the general PO file.

  428. SoloWoo 2006-03-28 / 7.43 am

    I have modified the plugin slightly so that it can list known languages in a very clean and neat way, as you can see on the top right corner of the web page below:

    http://www.solowoo.com/?p=174

    Wish this feature could be incorporated in future release.

  429. 囌嚕嗚 SoloWoo.com 2006-03-28 / 8.32 am

    Modified Polyglot…

    Polyglot is a great plugin that gives Wordpress multi-lingual capability. This blog, for example, is employing it to make the interface available in both English and Chinese.

    I have modified the plugin slightly so that it can list known languages i…

  430. maira 2006-03-28 / 11.23 am

    I’ve just sent you the gettexted default theme, I hope it can be useful or at least serve as a guide for those wanting to localize their own theme.

    Regarding the implementation of full xx_XX language codes, I’ve found this page with a solution you might like, in case you haven´t tried yet:
    http://www.urbangiraffe.com/2005/07/18/wordpress-localization-menu/

    Polyglot is working wonderfully on my test site most of the time. However, and even though I’m not using permalinks, it redirects to the main page after changing languages from a category page. Is this a known issue we have to live with or maybe there’s a workaround to it?

  431. 囌嚕嗚 SoloWoo.com 2006-03-28 / 12.00 pm

    Using Polyglot with Breadcrumb Navigation XT…

    I have been using Breadcrumb Navigation XT and, after installing Polyglot, found that they do not work well with each other. The problem is that Breadcrumb accesses the database directly instead of relying on function calls that Polyglot has added fi…

  432. malyfred 2006-03-28 / 2.22 pm

    maira:: Thank you for the theme, I’ll look at it ASAP.

    “redirects…” – that’s known issue. The problem is that native support for permalinks in WP is, in theory, very strong but very poor in the real life. You have to live with it but I am working on ultimate solution for all rewriting issues:) (thanx to suggestion from TyskJohan)

  433. Vincent Prat 2006-03-28 / 4.28 pm

    Hi,

    concerning the issue with wordpress post editor always changing the tags: I could not find any solution to get my lang_xx tags in the correct way.

    Which editor are you using ? Any Wysiwyg editor to recommend that could offer you the possibility to edit the source directly ?

  434. Kinkistyle 2006-03-28 / 10.36 pm

    To comment 431: Nice catch SoloWoo. I used that bit of code for my “Recent Posts” plug-in and it now translates post titles that show up in my sidebar.

    My guess is that that little hack could work for translating content for almost all sidebar plug-ins.

    Thank you!

  435. malyfred 2006-03-29 / 12.23 am

    Vincent Prat:: I’m not using any WYSIWYG editor in WP, but I have some other plugins installed that possibly fix these redundant <p> tags.

    Try Polyglot 1.3 where I’ve implemented very simple method that should help. Put an empty line between lang_xx tag and a content to make it work.

  436. Leo 2006-04-01 / 1.33 pm

    Hello, Malyfred.
    Is there any way to get Polyglot working with Dagon Design Sitemap Generator Plugin? I still can’t realise how do plugins interact…

  437. joe parkin 2006-04-02 / 11.37 pm

    hi/hola,

    i have been reading through the comments patiently up until now as i have realised that my eyes are touching the screen from straining so much!

    this plug-in is excellent and is already doing, very very nearly, everything i need it to for my site.

    my site’s not a blog as such. i am using wordpress as part of the website for my new english teaching company in Madrid. I am using it as the front-end of what is essentially a library of all the materials required for our courses but with the ability to leave comments and such.

    My problem is that i need ALL of the text to be translated. I have got pages, titles, comments, menus working but i am having trouble with things like headers or anything that prints out as html from a page template (i hope you get what i mean).

    An example would be the “Leave a Response” header above the input box for a new comment or another would be the text that says “search” above the search box.

    I really appreciate your working in making this great plug-in available and thank you greatly.

    Regards,

    Joe Parkin

    P.S. i’m not exactly an expert with PHP so be gentle with the code!!!!

  438. Vincent Prat 2006-04-03 / 11.39 am

    maly : Concerning the problem for editing posts, I have installed the editormonkey plugin which works well now.

    I found a bug (or a misuse from my side ?) with user’s preferred language :

    Example ->
    http://www.vincentprat.info/wordpress/category/general/?lp_lang_pref=fr
    http://www.vincentprat.info/wordpress/category/general/?lp_lang_pref=en

    You can see that only the titles of the posts (and not the content) get translated to the preferred language. If you click on the flag then the post in the single post view is translated correctly.

  439. malyfred 2006-04-03 / 11.39 am

    joe parkin:: Check: http://codex.wordpress.org/WordPress_in_Your_Language as all these strings should be translated in the .po respectively .mo file and be handled by gettext. Then you have to make sure that all these strings are passed to the WP built in gettext (__("Search") or _e("Search")).

    Second but depriciated option is to call Polyglot for these strings – echo lang_picker_respect_more( "<lang_xx> one language </lang_xxx> <lang_xy> second language </lang_xy>" );

  440. malyfred 2006-04-03 / 11.59 am

    Vincent Prat:: I think you don’t use the tag <!--more--> properly.

    <lang_xx>one</lang_xx>
    <lang_xy>two</lang_xy>
    <!--more-->
    <lang_xx>three</lang_xx>
    <lang_xy>four</lang_xy>

  441. SoloWoo.com 囌嚕嗚 2006-04-03 / 5.14 pm

    Polyglottable Plugins…

    I have modified the following plugins so that they would work with Polyglot (i.e. the original ones do not). The modifications are marked between “solowoo begins/ends”, just in case anybody interested.

    Breadcrumb Navigation XT

    Popular…

  442. Fernando A. 2006-04-03 / 11.42 pm

    This is one great plugin!
    One question.
    It’s al working though the text is in a different font. It’s a real dull one,…..like it’s quoting.
    You can check it at my site.

    Is there somehtng i’m missing?

  443. malyfred 2006-04-04 / 12.28 am

    Fernando A.:: I cannot check it because it says: “Very soon”, but there is no reason why the text should be shown in the different font.

  444. Vincent P. 2006-04-05 / 9.13 am

    Maly: thanks, it worked :)

  445. andy 2006-04-05 / 11.14 am

    Great plugin!!

    Is it possible to check if a certain language of a post is empty?

    For example: My default language is English, but Post ABC only has a Chinese version of it.

    I want to show the post’s info only if the user is in Chinese mode. If it’s in English mode, I want to disable the empty link:

    Any ideas to do this?

  446. andy 2006-04-05 / 11.18 am

    I think the “empty link” was removed from the post. Here’s what I meant:

    <a href="postABC.html"></a>

    Apologies about that!

  447. malyfred 2006-04-05 / 1.01 pm

    andy:: There is already built-in mechanism to show message that certain language version is not available. But I don’t think that the removing of the post completely is a good idea.

    It’s possible though and if you are familiar with PHP and WP – go ahead!

  448. lordjiem 2006-04-05 / 1.42 pm

    Hi !
    Your plugin is great (thank you very much !) but there seems to be some incompatibility with the new wordpress widget plugin (on my website, for the less):
    With FR and EN set as lang, when I switch from EN to FR (flag on the bottom of the page), the sidebar losts its “search box” and “categories” widgets. And they come back when switching back to “EN”.
    The most amazing thing for me is that they even temporarily disappear from the Widgets administration panel !
    I will still investigate, but maybe someone could help me ?

  449. andy 2006-04-05 / 1.50 pm

    Thanks Malyfred!

    I just looked into the feature, and it looks great. I see that the “text_is_missing_message” replaces the content of the post (i.e. the_content).

    I’m not too familiar with PHP. Would you know how I can replace the title with the text_is_missing_message also?

    Right now, it’s giving me a blank. Any help would be great.

  450. malyfred 2006-04-07 / 1.58 am

    andy:: as mentioned in comment #342 change:

    add_filter('the_title', 'lang_picker_respect_more',1);

    to

    add_filter('the_title', 'polyglot_filter_with_message',1);

    But don’t forget that you get the same text_is_missing_message twice then.

  451. Gavin 2006-04-07 / 2.28 pm

    Malyfred,
    I’ve been playing with your great plugin for a while, and I’ve come close to going live with it, but I have some issues.

    1) Even though in my config.php file has default lang set to pt, when I access my site for the first time it always defaults to the english version. Since the majority of my visitors are portuguese speaking, that’s a problem.

    2) As you can imagine, maintaining an updated POT through constant site changes can be a problem (I tend to mess a fair bit with the HTML and headings etc in the templates.) Any prevision for a type template function, like the Gengo plugin has? BTW, been looking at Gengo too, and the thing that keeps bringing me back to Polyglot is that the different versions are kept in the same page.
    Thanks!

  452. Gavin 2006-04-07 / 2.49 pm

    Strike that first question… figured out the part about the knownlang default…!

  453. malyfred 2006-04-07 / 3.26 pm

    gavin:: You have to translate parts that are gettexed – there is no way around as this is the core feature of WP.

    But you can alway use function: lang_picker_respect_more() which accepts string with all language versions of some text and returns the proper version according to the current users preferences.

    You’ll get a bit nicer name for this function in the next version of Polyglot:)

  454. Dan 2006-04-10 / 4.33 pm

    Hi,
    Wicked plugin, however after about 5 hours of trying to figure it out I’ stumped.

    I’m trying to design my template so that it can be displayed in two languages as your plugin allows. I’ve got the posts changing language fine, I’ve created my .mo file and named it correctly, I’ve altered my wp-config.php to set the default. I’ve also tried using e_(”") to echo my strings based in my template. However none of these seem to want to change the language text to the one defined in the mo file. I have also saved the .mo file as themename.mo in the theme folder and specified it in the index.php file with load_theme_domain(’name of theme mo file minus extension’).

    I think that I have some problem either with the way I am initialising the switching (using your code above to change the url to lang=en) or my generation of the .mo file and where it is located. Any help greatly recieved!

  455. malyfred 2006-04-10 / 6.43 pm

    Dan:: What about this: http://fredfred.net/skriker/index.php/wordpress-fix-for-localization/

  456. Jodok 2006-04-12 / 7.39 am

    I have installed the Polyglot plugin, but got this error:

    Warning: Missing argument 2 for polyglot_the_date() in (xxx)/polyglot.php on line 391

  457. malyfred 2006-04-12 / 9.52 am

    Jodok:: That shouldn’t happen but some plugin probably does weired things somewhere…

    Easy fix – find that line and change it to:

    polyglot_the_date($the_date, $d = "", $before = "", $after = "")

  458. Andries 2006-04-12 / 11.45 am

    @Solowoo and Kinkystyle – 431, 434

    I use the Fuzzy Recent Comments plugin, but my titles are not translated. Could someone tell me where I should enter the code of solowoo to “hack” the plugin:

    “if (function_exists(’lang_picker_respect_more’)) {
    $result = lang_picker_respect_more($result);
    } ”

    This is the php code of fuzzy comments in pastebin :
    http://pastebin.com/655265

    Again malyfred, tnx for this great plugin!

  459. malyfred 2006-04-12 / 2.03 pm

    Andries:: Change line 861 to:

    $post_title = apply_filters('the_title', $post->post_title);

    That is the most general fix which can help other plugins to work as well.

  460. rebecca 2006-04-13 / 12.35 am

    Is there any possible way to have the plugin work if I place <lang_cn> tags directly onto a php file (e.g. sidebar.php)?

    It seems the plugin only works if I use the administration “Write Post” area.

    Is there a work-around somehow to include the tags directly on the php files as well?

  461. malyfred 2006-04-13 / 1.32 am

    rebecca:: As mentioned several times – you can pass that text to the lang_picker_respect_more().

  462. rebecca 2006-04-13 / 2.22 am

    Was anybody been able to integrate Polyglot with EventCalender 3.0 (http://blog.firetree.net/2005/07/18/eventcalendar-30/)?

    I tried using this filter:
    add_filter('ec3_get_events','lang_picker_respect_more',1);

    but it’s not translating the event names. Maybe I’m using the wrong function — I don’t know. Has anybody here been successful with this?

    (BTW, I’m not a PHP expert as you can tell :)

  463. maira 2006-04-15 / 4.07 am

    rebecca: change line 790 of eventcalendar3.php from
    $data['TITLE'] =$entry->post_title;
    to
    $data['TITLE'] =apply_filters('the_title', $entry->post_title);
    or
    $data['TITLE'] =p__($entry->post_title);

  464. borris 2006-04-15 / 3.10 pm

    .

    Thank you very much Martin and all contributors for your great great work. Allthough I don’t know much about PHP i got the plugin working in my (still offline) WP-page. I want to have it trilingual english/spanish/german. Three major problems that i wasn’t able to resolve, may be – surely – you know the answer:
    (I’ve installed wp 2.0.2, using the gettext default-theme)

    1. Clicking on Archives or any (test-)post in Categories, the browser shows this message:

    WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' )' at line 1]
SELECT post_id, category_id FROM post2cat WHERE post_id IN (, )

    Tried to solve the problem with your comment 135, but this cancels all bilingual functionality.

    2. It seems ridicoulous but can’t show the flags… my trial-settings:
    polyglot.php:
    $polyglot_settings['use_flags'] = true;

    sidebar.php:

    => firefox and camino show text, safari empty image placeholder
    when i put false to both lines, all browsers show text.

    3. The major problem:

    A cklick on the spanish-link in the sidebar destroys the layout.. all links gray, nothing blue, all texts bigger than originally). Clicking english or german is okay.

    Is it a bug in the es.mo file?

    Thanks in advance for any help!!

    borris

  465. Boriel 2006-04-15 / 5.26 pm

    Polyglot does not currently translate the title of the page (The title displayed in the browser window).

    To fix this, just add the following line:
    add_filter(’wp_title’, ‘lang_picker_respect_more’, 1);

    into the polyglot.php file, and use the scheme, instead of the for the categories.

  466. Boriel 2006-04-15 / 5.28 pm

    Hmmm. My tags wrapped, I meant:
    …and use the [ lang_XX ] scheme insted of the <lang_XX> one.

  467. borris 2006-04-15 / 5.47 pm

    hi again

    … tracing the problem described in post 456:

    concering 3.: with any langunage (i tried en, de, fr, pt, ja) it works, but is doesen’t work too with ca (=catalan), that really strange!!

    i tried the classic layout and everything is fine – am i right that the problem is dealing with the gettexted kubrick theme?

    best regards

    borris

  468. borris 2006-04-15 / 8.38 pm

    hola boriel
    thank you very very much, it works perfectly now!
    but do you have an explication why only the spanish didin’t work?
    cordialmente borris

  469. boris 2006-04-15 / 10.45 pm

    hi again,
    pages work fine, but clicking Categories or Archiv still produces the sql-error-message :-(
    any further idea? thanks in advance and best regards
    b.

  470. borris 2006-04-16 / 1.44 am

    hi again,
    hope you don’t mind, this is going to be a long comment, in order to inform about all the steps i did trying to resolve the problem described from 464 up tp here:

    1. I’ve installled the spanish wp 2.0.1. version. Apparently everything ok.

    2. Installed and activated the gettext_default theme: sidebar-layout “destroyed”, click on Archiv and Categories produces sql-error

    3. Changed language in wp-config from ‘es_ES’ to ‘en’: the text of the search-button changes to english

    4. Re-activation of the (spanish) default theme: Archiv and Category ok. Change of WPlang in wp-config only affects the admin-area/backend

    5. Installation and activation of the Polyglot plugin. So far no languages, but no problems with sql

    6. copying fr.mo and de.mo to the languages-folder. no problems.

    7. $polyglot_settings['knownlangs'] = array(’en’,'es’,'fr’,'de’); => the spanish default-category “General” (i think it’s “uncategorized” in english) changes to german (”Allgemein”). No other changes. “Categorias” itself (spanish) stays spanish. If i delete ‘de’ from the knownlangs, “Allgemein” returns to be shown the spanish “General”.

    8. In order to change between the languages i copy to the sidebar (spanish default-theme) the following code:

    9. Clicking now the language links change the month in Archives, the login/logout-text and the default-category. no sql-errors.

    10. activation of the classic-theme, again pasting the code to the sidebar: everything seems to be okay

    11. new page

    title:
    Page one EN

    content:
    first new page

    works fine withe classic and the default theme, no sql-errors cklicking Archives or Categories

    12. new post

    title:
    Comment one EN

    content:
    first new comment

    works fine withe classic and the default theme, no sql-errors cklicking Archives or Categories

    Fundamental functional differcnce between the two themes: classic shows the top-menues (pages, categories, archives) in each language. I supose that’s dealing with the gettext stuff….

    13. now another activation of the default_gettext theme:

    - without new code in the sidebar.php: main menu items appaer in english (Pages, Archives, Categories), the first page is spanish, as installed. Clicking Archives or Categories produces the sql-error message:

    WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' )' at line 1]
SELECT post_id, category_id FROM wp_post2cat WHERE post_id IN (, )

    - pasting this code into sidebar.php

    brings the following result: fully translated menu, possibility to read in each language the formely generated page and comment – but: sql-error-log cklicking Archives and Categories and, clicking the spanisch link in the sidebar destroyes the sidebar layout

    14. last hope, boriel’s advice pasting to polyglot.php

    add_filter(’wp_title’, ‘lang_picker_respect_more’, 1);

    but it doesn’ resolve the probelm…

    15. My conclusion:
    or there is a bug in the es.mo (same problems if i rename it to sp.mo or anything else and change the polyglot.php accordingly)
    or there is a bug in the default-gettext theme.

    Unfortunateley, i’am unable to detect nor to resolve it, so any help of you would be very very welcome!!

    thanks in advance
    b.

  471. Ann 2006-04-19 / 7.33 am

    Is there any way to add a filter to the comment links for each post? Right now the popup titles that link to the comments show the full titles with lang tags, eg. “Comment on blahblahinaa” instead of parsing the title languages.

  472. malyfred 2006-04-19 / 10.54 am

    Ann:: No filter for this:(

    Problem is in comment-functions.php on line:

    echo ' title="' . sprintf( __('Comment on %s'), $post->post_title ) .'">';

  473. Boriel 2006-04-22 / 12.25 pm

    Ann (471) and malyfred (472):

    There is no filter for that, but you can make a workaround for it:

    Within the Loop, and just before calling the comment-popup-link, add the following:

    <?php
    global $post;
    $post->post_title = lang_picker_respect_more($post->post_title);
    ?>

    After that, you can call the comment function as always:

    <?php comments_popup_link(’No Comments »’, ‘1 Comment »’, ‘% Comments »’); ?>

    This will translate your post title for each post before calling your comment popup, and your page will validate XHTML. :)

  474. StuFF mc 2006-04-24 / 1.39 pm

    I need a way to only show the posts that have a content for the selected language… Because my website is for the same podcast in 3 different languages and the french visitors does not want to see the german podcast (for example)

  475. malyfred 2006-04-24 / 3.30 pm

    StuFF mc:: Ok guys, I see that there is no way to persuade you that you should not hide content of your web from your visitors:)

    I’ve added this feature to my ToDo list…

  476. brian anderson 2006-04-25 / 10.11 pm

    I’m working with a client that wants to use

    <chinese>these words in chinese</chinese>

    instead of

    <lang_cn>these words in chinese</lang_cn>

    Is this possible?

  477. malyfred 2006-04-26 / 12.50 pm

    brian anderson:: well, with a bit of hacking – it is possible. Find the line whre the tags [ ] are processed in ‘polyglot_filter’ function and add there very similar line which replaces your custom tags with the proper version.

  478. Boris 2006-04-28 / 2.32 pm

    Hi,

    I’m new on PHP i’ve installed Polyglot on my girlfriendds site and want to hide any text from index.php (like: Friday, April 28, 2006, filed under …) when no Title and post specified in some language?

    Thanks in advance.

  479. Alexander 2006-04-30 / 6.36 pm

    Thanks! Good manual

  480. David Greg 2006-05-18 / 1.26 pm

    Is it possible to stop the WP admin from switching languages I only want the language switch to work on the actuall website?

  481. malyfred 2006-05-18 / 8.24 pm

    David Greg:: Not at the moment. I can add this feature to the future release.

  482. Wojtek 2006-05-19 / 11.52 am

    Gret plugin – it works form the start :) (which is not always obvious).

    I read all the comments above and (if I doid not mis anything) I have a small question:
    Is there a way to always present a post in a fixed language (say, pl), no matter the settings in the browser of the reader?

    The rational is that most of my posts in Polish are complete (and readers will make the effort to understand them) and I just usually publish a summary in Emaglish or French.

    Thanks!
    Wojtek

  483. malyfred 2006-05-19 / 12.08 pm

    Wojtek:: just don’t specify the language for the parts of the text that should be always shown and you get what you want.

  484. Wojtek 2006-05-19 / 12.42 pm

    @malyfred: thanks for the super-fast answer.
    I though of this initially, however I still would like to keep posts in different languages separated. Therefore the scenario I am looking for is to always display the Polish version to everyone initially, and then if someone would like to see the translation — to give them the ability to click on the flag.

    If this is not possible then I will go ahead with your suggestion (though that bay be an entry for the “wishlist” :))

    Thanks – Wojtek

  485. Wojtek 2006-05-19 / 12.45 pm

    small update to my entry: the last but one line should read:
    ” … — to give them the ability to click on the flag and see only the translation”

  486. Remco 2006-05-22 / 2.33 pm

    I’m implementing Polyglot and it works beautifully!

    A few problem sofar: I cannot get it to translate the link category titles, generated by get_links_list. I tried adding the tags and I tried using translations in my mo file. Both don’t work.
    I have the same problem with the link/linkdescriptions in the links list.

    Any suggetions? Thanks!

  487. malyfred 2006-05-22 / 3.01 pm

    Remco::

    visit: http://codex.wordpress.org/Template_Tags/get_links

    and then try:

    echo apply_filters('polyglot_filter', get_links(blabla...,false));

    or

    echo polyglot_filter(get_links(blabla..., false));

  488. Remco 2006-05-22 / 4.06 pm

    Malyfred:
    Thanks, tried your approach but cannot get it to work.

    First, I would like my links in a list with the category titles to show, so get_links_list is what i would need en not get_links. I tried it anyhow, to see if I could get the links itself to translate. But can’t get that to work either.
    -do I need to change anything in polyglot.php?
    -should your approach work with or tags or with mo file translations?
    -should your approach also work with get_links_list, or only with get_links?

    I would be very happy with links category titles to translate, and extremely happy if the links and link descriptions would work too.

  489. malyfred 2006-05-23 / 12.52 am

    Remco:: As far as I know, there is no way to get it work with get_links_list unless you edit the code of that function:(

    The idea is that get_links() should be good enough to produce any kind of list that you could possibly wanted.

    You don’t need to change anything in the polyglot.php, just add all language versions directly into the link title and description.

  490. john 2006-05-23 / 7.56 am

    Hi Malyfred,

    My Chinese font is so small, but I would like to keep the English font (the primary) the same size as I have it now.

    Is there any way I can enlarge the Chinese font without changing the size of the English font?

  491. malyfred 2006-05-23 / 10.36 am

    john:: comment #134 and a two lines of PHP could help you to include different style sheets for different languages. You can define then the font size as you need.

  492. Remco 2006-05-23 / 8.26 pm

    Hi Manfred, thanks for your answer on 489.
    As far as I can tell, get_links() cannot get the link category titles. (I’ll check it again to be totally sure). In get_links_list() these titles are generated in H2 tags.
    You are right I can get the links themselves in every possible format.

    You should consider a polyglot-optimized set of template tags, for those users that are more interested in the full polyglot functionality than in upgradability of their wordpress installation.

    Thanks for the good work anyway. I already can translate more on my site than I possibly would have believed before. Too bad I cannot go all the way -yet.
    See my site (under construction, not too many translations yet) at: http://www.steppingstonesforafrica.org

  493. glittersoul 2006-05-24 / 4.53 am

    Hi, I’m having trouble getting polyglot2 to work for me.. is there some sort of admin interface that I access? please e-mail me and let me know because I’d love to get some translations up :)
    Thank you!

  494. Remco 2006-05-24 / 4.06 pm

    Hi, Back again. For the people struggling with the same, I found a solution for the translation of the link category titles, by using the function get_linkcatname(). It is not documented in the codex, but works like:

    This gets the translated link category title. Then below the title, use get_links().

    Further, after reading back all the posts above, I tried to get my links and link descriptions to translate using:

    ‘,”,”, false, ‘id’, true, false, 10, false, true)); ?> (as you suggested)
    and
    ‘,”,”, false, ‘name’, true, false, 10, false, true)); ?> (as I read somewhere here above)

    but none of these work. All I get is the links and linksdescriptions in both translations with tags around them.

    Am I doing something wrong here?

  495. Remco 2006-05-24 / 4.53 pm

    My code in the previous post was cut off: I meant to write:

    echo apply_filters(’polyglot_filter’,get_links(1,”,”,”, false, ‘id’, true, false, 10, false, true)
    (as you suggested)

    and

    echo lang_picker_respect_more(get_links(1,”,”,”, false, ‘name’, true, false, 10, false, true)
    (as I read somewhere here above)

  496. malyfred 2006-05-24 / 5.14 pm

    Remco:: You should read carefully what I write… please note the FALSE as the last parameter in my example (comment #487).

    All parameters are explained in the codex on the address that I have suggested above as well.

  497. rags 2006-05-25 / 11.52 am

    Hi thx for this nice plugin – the translation of pagetitles and blog posts work for me.

    I have the following goal:

    If a user choses his/her site language, the comments on a multilingual blog post should also be marked to belong to the users language and the comment-thread should only show the comments written in that language. If the site language is changed by the user, the comments written in the chosen language should appear (I dont like the language mix in the comment thread).

    Is this possible, using Your plugin?

    Thx for hints

  498. Remco 2006-05-25 / 12.25 pm

    Hi Malyfred,
    I DO read the codex, all the time :-). But I didn’t read your comment carefully enought, thought it was like an example. I’m not really a php hero, but I’m learning fast this way. Thank you very much for pointing out my error to me. All links and link descriptions translate beautifully now, which is fantastic.

    As to my comments in 494 about the link category titles (for those interested), my code didn’t come through, I meant to write

    echo apply_filters(’polyglot_filter’,get_linkcatname(2));

    where 2 is the link category id.

  499. malyfred 2006-05-26 / 11.34 am

    rags:: Mark all comments is easy. Filter only comments written in certain language is not that easy but it’s feasible. Both require some advanced hacking in the Polyglot’s code.

    But as I said several times here – I really don’t think it’s a good idea to hide some content of your web from your visitors. There are many people around who speak more than one language and you force them to check you web with several different language settings if they want to read all comments.

  500. glittersoul 2006-05-27 / 8.17 am

    In case e-mail isn’t preferable, I am still checking back here. Can anyone please let me know how I access the admin panel (if there is one for polyglot2, which is what I’ve installed)? I’m rather confused at this point so any help would be appreciated. Thank you :)

  501. malyfred 2006-05-27 / 10.01 am

    glittersoul:: there is no admin panel for Polyglot. You must set everything directly in the polyglot.php.

  502. glittersoul 2006-05-28 / 7.11 am

    Oh, I see, well thank you, that clarifies where I must be messing up, then. I wasn’t sure if I’d missed some major part of the process of set-up. I appreciate the information.

  503. Triqui 2006-05-29 / 3.26 am

    I managed to solve the problem of having WordPress in two (or more) languages in a rather new way, check it out if you think it can be useful
    http://www.emanueleferonato.com/2006/05/26/wordpress-in-two-or-more-languages/

  504. Remco 2006-05-30 / 5.52 pm

    I was wrestling with translating the time-since plugin with polyglot, as in my language (Dutch), the plural of for example ‘week’ is not ‘weeks’, but ‘weken’. The way the plugin is written assumes plural is just adding an s, but in Dutch that is not the case, makes it difficult to get the terms translated by polyglot/gettext via the .mo file. So here is a tip if in your language you have the same problem: download the Dutch translation of the time-since plugin here and change the dutch singular and plural to your language.

  505. Remco 2006-05-30 / 5.54 pm

    …forgot to add to my last post:
    And in the time-since.php file, add __() around the terms for days/months etc. and around the en (and).

  506. eduardo 2006-05-31 / 8.50 am

    Hi,
    I am trying to use your plugin for the first time, v2.0. Some problems found, though:
    The plugin seems to choose the language according to the browser setting, and chooses the correct text. It also shows a flag for the other language. But the flag leads nowhere: if not using permalinks for language viewing, i land in the original post. If using the permalinks, the plugin fails to add the trailing slash to the original post name before adding the URI hepers, so i incur in a 404 error. If i then edit the URI in the browser navigation bar, i again get a 404.
    Any ideas?
    (ps. i have deactivated it to keep the page looking right).
    Thanks!

  507. eduardo 2006-05-31 / 8.56 am

    Oops, i forgot to mention: i use other plugins to deal with permalinks. One is “enforce www preference“, and the other one is “permalink redirect“, and also “redirect old slugs“.
    Thanks!

  508. Stian B. Barmen 2006-05-31 / 3.32 pm

    I am trying to set up polyglot on my mother cabin for rent page, dev version now at http://eagledev.barmen.nu.

    It mostly works fine, but the Title and Tagline is not translatable. Any ideas? I can of course code them myself into the theme, but maybe there is a better way?

    Of course I tried the approach. :)

  509. Joe Parkin 2006-06-01 / 7.39 am

    Hi,

    I’ve been working on my site for a while now with polyglot and i am generally more than happy with it and would like to thank you again for having made it for us!

    I left a message once before about not everything on the page getting translated. Apparently I need to change the .po or the .mo file and add what I want. Is there an editor available for Mac OSX? I read somewhere that you need an editor and neither dreamweaver nor textedit would open it.

    My other problem is that, although i have increased the number of characters allowed in the category name in my WP database, it just shows up as the whole thing i.e. with the tags and both languages.

    Thanks to all in advance,

    Best wishes,

    Joe Parkin

  510. malyfred 2006-06-01 / 10.46 am

    eduardo:: You probably don’t have trailing slash in your “Customize Permalink Structure” – add it there. If you have it there then Permalink Redirect plugin is probably doing some weird things.

    Collision with other permalink plugins is pretty probable because the permalinks are not handled in WP in a very nice way so the authors of plugins have to find workarounds. I’d recommend finding wich plugins don’t work together and not using one of them.

    The other option is to find out how they are handling permalinks and there will be probably easy way how to fix it.

  511. malyfred 2006-06-01 / 10.59 am

    Stian B. Barmen:: One hook for that was missing in Polyglot. It’s fixed now so just download the current version of Polyglot and it should work fine.

  512. malyfred 2006-06-01 / 11.10 am

    Joe Parkin::: Check http://www.poedit.org/, it seems that they are working on Mac version.

    The .po file is just plain text file so you can edit it in any text editor and then “compile it” – http://www.gnu.org/software/gettext/manual/

    What function do you use in your template for showing categories?

  513. eduardo 2006-06-02 / 2.15 am

    Hi Malyfred, thank you for your reply.

    Indeed i didn’t have the trailing slash in my permalink structure. I supposed ou function polyglot_trailingslashit() would take care of that, isn’t it so?
    Well, i added the trailing slash to my structure (not very sure if that is correct tough, because this way a post will look like a directory in the browser’s address bar). The links generated by polyglot got ok.

    I the turned off all 3 plugins that dealed with permalink (the ones i mentioned), but unfortunately your plugin still doesn’t work! It chooses the right text and generates the flag-links to other languages, but the link lands in a 404… odd.

    Any help will be much appreciated!
    (i have turned all back to normal in my site, if you need to see the problem tell me and i will make it appear to you)

  514. malyfred 2006-06-02 / 7.40 pm

    eduardo:: I’ve found what’s wrong – your version of WP is too old. New Polyglot’s permalink functions relies on stuff that has been introduced in version 2.0.

  515. eduardo 2006-06-03 / 1.19 pm

    hey Malyfred,

    I see. I should take a while more to update my WP, there are a few things wrong with WP’s internationalization that i have managed to compensate for in WP 1.5, but i still didn’t find a way in 2.0 (like for example: there is a “category base” variable in it’s permalink structure, but there is no “author base”, so we are stuck with the english word “author” is the URIs).

    So can i use an older Polyglot version? Does version 1.3 work with WP 1.5.2?

    Thank you for your help. It is now important to me to translate many posts to other languages.

  516. eduardo 2006-06-03 / 1.33 pm

    Take a look here please:
    http://trac.wordpress.org/ticket/301
    http://trac.wordpress.org/ticket/1762

  517. Remco 2006-06-03 / 6.52 pm

    Hi Maleyfred,
    I have a problem getting the names of the months translated. In theloop.php and in sidebar.php, there are the sentences like: You are currently browsing the archives for May, 2006. I can get all the words translated using _e(), but the month name won’t translate. It uses: the_time(’F, Y’);
    In locale.php, the months are written like this: $month['05'] = __(’May’);
    So I thought the months should translate when I put the proper translation in the .mo file. But it doesn’t work. Could you help me out? thanks in advance.

  518. malyfred 2006-06-03 / 10.29 pm

    Remco:: Well, turn off time settings in Polyglot – it could help. The problem is that WP developers don’t care about other languages than English so they use PHP funciton date() which is useless for i18n.

    I already have a workaround for this but I don’t have a time to implement it at the moment.

  519. Remco 2006-06-04 / 1.15 pm

    Hi Malyfred,

    I turned off time settings (everything in between ‘time-functions’ comments in polyglot.php) in Polyglot, which didn’t help.
    Tried everything in my sidebar.php, including using other functions like get_single_month etcetera, all didn’t help.

    Then, I tried to analyse what happens. I discovered, if I set WPLANG manually to my second language (nl) in wp-config.php, everything, including month names (!) translates perfectly if choosen nl as language on the site (Of course I can’t switch back to english then).
    The same with Polyglot plugin turned off (of course posts don’t translate then).

    So my conclusion is that somewhere in the switch of WPLANG by polyglot, the month/date/time isn’t switching, which is switching if WPLANG is set manually. (sorry for my non-programmers phrasing).

    Do you have any more suggestions based on my conclusion?
    Could you be more specific about which rules/functions in polyglot I could try to turn of?

    Reading your remark about the date function, I read around in the codex, and I found some people talking about a function called date_i18n(). I wouldn’t know how to use it, but could this help?
    From the codex it looks like they are really putting an effort in making Wordpress translatable.

  520. thurner rupert 2006-06-07 / 10.56 am

    we use polyglot, but there are two little things we would like to have:
    * activate the flags, it did not work
    * two additional lanuguages, als (http://als.wikipedia.org), and rm (http://rm.wikipedia.org/)

  521. WordPress mehrsprachig - flying sparks 2006-06-07 / 11.46 am

    [...] Christian Strang beschreibt seine Erfahrungen mit dem Plugin Polyglot. [...]

  522. Rodrigo Contreras 2006-06-07 / 4.20 pm

    Hi, Malyfred. This plugin is awesome!
    But my RSS feeds are still buggy.

    The description and category tags don’t get translated and both show the original full string like the following:
    hello

    In the web page they work fine.
    I read all the comments and did what’s suggested, but nothing…

    I’m using WP 2.0.2 and Polyglot 2.0.

    A re-worked RSS config tutorial would be appreciated.

    :)

  523. Boriel 2006-06-07 / 9.21 pm

    Rodrigo, I fixed that.
    Add the following lines to polyglot.php:

    add_filter('the_category_rss','lang_picker_respect_more',1);
    add_filter('the_category_rss', 'polyglot_lang_picker_htmlentities',1);
    add_filter('the_category_rss','polyglot_translate_the_category');

    I’m using Polyglot 1.3.

  524. mauro 2006-06-10 / 6.29 am

    Hi, many thanks for your useful plugin.
    I solved the problem of Recent Posts list. Because of lack of hook in wp_get_archives, I hackedan an old routine by Nick Momrik (thanks) to get recent posts list.
    I inserted two lines of code to call a polyglot function and translate the post title.
    The whole stuff is a little long, so http://www.maurograziani.org/wordpress/polyglot-and-recent-post-list/

  525. tzMartin 2006-06-11 / 6.12 am

    Those using the ‘Top10′ plugin from weblogtoolscollection

    I have modified the plugin so that it will work with Polyglot. The modifications are marked between “Polyglot begins/ends”. Just cut and paste this function below into the Top10.php plugin:

    function show_pop_posts() {
    global $wpdb, $siteurl, $tableposts, $id;
    $results = $wpdb->get_results("select postnumber, cntaccess from mostAccessed ORDER BY cntaccess DESC LIMIT 10");
    echo "";
    if ($results) {
    foreach ($results as $result) {
    // Polyglot begins
    if (function_exists('lang_picker_respect_more')) {
    $result->postnumber = lang_picker_respect_more($result->postnumber);
    }
    // Polyglot ends
    echo 'postnumber).'">'.lang_picker_respect_more(get_the_title($result->postnumber)).' ('.$result->cntaccess.')';
    }
    }
    echo "";
    }

    If you have problems, you can download the mod file here:
    http://www.tzmartin.com/downloads/wordpress/plugins/top10.phps

    (just rename the file and upload it to your ‘plugins’ folder.)

  526. cosmin 2006-06-15 / 5.13 am

    im gonna using wp

  527. yhtsai 2006-06-18 / 12.14 pm

    Hello Malyfred,
    I wrote a polyglot plugin under b2evolution named PolyglotX, porting from your Polyglot plugin.
    Thanks for your idea!

  528. Hiddenson 2006-06-19 / 3.01 pm

    Hi,

    I upgraded my WP installation from 1.5 to 2.0. As far as I know, the plugin was working perfectly then, but now I get a strange error on only certain entries, as you can see in http://construct.hiddenson.net/page/4/

    For some reason, two posts are out of design. I figured it was the new editor, so I disabled visual and changed tags into [lang]. It did not help.

    Any ideas?

  529. malyfred 2006-06-20 / 1.05 am

    Hiddenson:: Did you upgrade to the latest version of Polyglot (2.0)? If not, do that as it is highly improved and fixes many potential bugs.

    I don’t think that your problem is actually caused by Polyglot though because all code generated by Polyglot is valid and looks as it is supposed to look like…

  530. Jerome Charaoui 2006-06-20 / 3.10 pm

    Using Polyglot 2.0, the month names in WP functions (eg. wp_get_archives) were not getting translated. I found a rather simple way to fix this :

    In polyglot.ini add the line include(ABSPATH . WPINC . '/locale.php'); after load_default_textdomain();

    Also, in your locale.php add the line global $weekday, $weekday_initial, $weekday_abbrev, $month, $month_abbrev;

    I think this might be a bug in WP (using 2.0.3 here) because variables like $month are global throughout the code, except in locale.php… They should be declared global in that file as well, methinks…

  531. Jerome Charaoui 2006-06-20 / 3.12 pm

    Forgot to mention a detail about the previous fix : make sure you add the line global $weekday, $weekday_initial, $weekday_abbrev, $month, $month_abbrev; at the beginning of the file, before the variable definitions! Otherwise it won’t work.

  532. Remco 2006-06-21 / 11.21 am

    Jerome,
    thank you VERY much for posting this solution! It works beautifully. It was the last problem I had with translating my site. (I described my struggles with it in post 519).

  533. malyfred 2006-06-21 / 12.28 pm

    Remco&Jerome Charaoui:: Good for you if it works as you need.

    But I don’t think it fixes translation of all dates in WP because they usually use PHP date() function which IMHO doesn’t work with other languages than English:(

    I’ll publish next version of Polyglot with unversal date&time fix as soon as I finish my uni degree.

  534. Remco 2006-06-21 / 3.09 pm

    Malyfred good luck with your degree. thanks for the good work.

  535. Max 2006-06-21 / 5.15 pm

    Hi Malyfred,

    Is it possible to fully translate the RSS feeds?

    At the moment my RSS ‘pubDate’ tags always come out in an English format and my RSS ‘language’ tag is always set to ‘en’.

    Many Thanks, Max

  536. Jan 2006-06-25 / 3.28 pm

    hey could someone pls help: i cant get default language german to work with my site !
    wp version 2.02, the german de.mo file is in its place and
    define (’WPLANG’, ‘de’);
    is set correctly, the admin interface is correctly german.

    but for some f*ckin reason the polyglot settings are screwed ?
    - version 1.3 (because 2.0 ruined my permalink structure ??)
    - $polyglot_settings['default_lang'] = ‘de’; is set

    what more do i need ? have a look at http://www.grnch.de , its still showing english posts as default ! i want my german, please….

  537. Jean-Marc 2006-06-28 / 10.11 pm

    Hi Malyfred,

    First : thanks a lot for that enormous job.
    I’ve a question about .
    The site I develop is destinated to be used by redactors knowing nothing about html and/or php coding, also bd using.
    I need then a really simple way to use the plugin by them.
    Of course, using is not difficult, but I’ve got 2 problems with it :
    1. Using the default WP wysiwyg, there is no problem at the first save. But if when editing a post, marks are disapearing when the post is recorded.
    Knowing that wysiwyg is not the best, I tried Xinha, what’s working good. But Xinha add a / in the marks. becomes and is not recognised anymore by Polyglot.
    Do you know a solution or a wau to create a button, like code button on forums?
    2. Because redactors will not be admin in that site, I can’t (and I don’t want) to ask them to add lines in .po file and compile it and upload it for new categories. Imagine what will be the site if one of them makes a procedure mistake and upload a bad .mo file …
    Second solution : marking categories name. In that case, maks disappear when record. The only solution I finded till now is to add marks directly in the database via phpmyadmin, but I don’t want redactors go in the db (You understand why …).
    Do you know that problem or is it just mine? In that case, how to solve it?

    Thanks for help and for plugin,
    Jean-Marc

  538. malyfred 2006-06-29 / 9.08 am

    Jean-Marc:: I’d say that you can solve both your problems easily – use [lang_xxx] instead of <lang_xxx/>

    [] tags are not modified by WYSIWYG editors and work for category names as well. Please check the “How to translate categories” part of the original post for more details.

  539. Jean-Marc 2006-06-29 / 9.19 pm

    Hi Malyfred,
    Thanks for that fast answer. I didn’t saw that.
    I’ve read “hotw to translate categories, but it’s written with what I tried. I didn’t tried [].
    With [], it works fine.
    I don’t wnat to need to use .mo for translating categories because redactors of the site know anything about .po, .mo files and I don’t want to let them “play” in files.
    The only problem I have now is in the archives.
    The site write :
    Archive for the Category ‘ unclassified’

    The line in my archive.php that write the cat name is :

    Is it possible with a cat named unclassified to have just Unclassified for english ?

    Thanks for help and for plugin,
    Jean-Marc

  540. Sandy 2006-07-10 / 11.11 pm

    Hi,
    My plugins runs very well. Thank you so much, Malyfred.

    However, I have a question is, why my titles of posts in Archive Page display whole the text as well as the code

    Plz take a look here:
    http://blog.camtvlive.com/category/my-writing-task/poems/

    But it display perfectly on the sidebar and on my Stats pages. But this problem still happens with the title of posts.

    Here is my stats pages.
    http://blog.camtvlive.com/wp-stats.php

    There are some func. of stats page, and I try to add hooks for them as follows:

    add_filter(’the_excerpt’, ‘lang_picker_respect_more’,1);
    add_filter(’display_stats’, ‘polyglot_translate_the_category’,1);
    add_filter(’get_recentposts’, ‘polyglot_translate_the_category’,1);
    add_filter(’get_recentcomments’, ‘polyglot_filter_htmlentities’,1);
    add_filter(’get_mostcommented’, ‘polyglot_filter_htmlentities’,1);
    add_filter(’get_mostemailed’, ‘polyglot_filter_htmlentities’,1);
    add_filter(’get_highest_rated’, ‘polyglot_filter_htmlentities’,1);
    add_filter(’get_most_viewed’, ‘polyglot_filter_htmlentities’,1);
    add_filter(’wp_list_pages’, ‘lang_picker_respect_more’,1);
    add_filter(’get_recentposts’, ‘lang_picker_respect_more’,1);

    But nothing happens. Please help me.

    Anyway, thank you very much for your super plugin, malyfred.

  541. Wojtek 2006-07-17 / 11.14 pm

    Greetings – I have a weird problem and I did not see it in the list above.

    If you look at http://blog.swiatek.name, you will notice that some posts, even though they have a Polish version show in the English one (pl is default). I spent hours trying to understand why some behave like this and some other are fine.
    The flag in the case of the bad ones is always British (even though the post is in English).
    In the single post view everything is OK.

    I traced it down (looking at the source of the page) to an extra being appended at the beginning of th epost (and not processed by the plugin). It i snot in the source of the blog entry (I even changed

  542. Andrew da Silva 2006-07-22 / 11.51 pm

    Hi!

    I installed your plug-in on a single column without the sidebar. And it worked great!

    Now I tried installing it on the K2 theme.. and it does not translate the Sidebar menu.. it shows the tags and both languages..

    Can you check out the URL and tell me what could be wrong?

    Thanks!

    http://prdq.qc.ca/

  543. Jimy 2006-07-25 / 4.19 pm

    The necessary plugin (:
    It is established easily and perfectly works.
    Thank u so much!

  544. Wojtek 2006-07-30 / 7.38 pm

    Please discard my previous post. i found the problem: adding a entry (to cut the text displayed on the main page) completly disorganizes Polyglot.
    For non-Polish browsers ([pl] is the default) the title is in English and content in Polish.
    Any idea what went wrong? :)
    Thanks – Wojtek

  545. Wojtek 2006-07-30 / 7.59 pm

    Ha – maybe the should be “bare”? (ie. not enclosed within brackets?)
    Looks so

  546. eduardo 2006-08-10 / 4.37 pm

    Hey Malyfred,
    I have been using your plugin for a while successfully, it is great.
    I would need your assistance with something. I use as the page title (the one in the header section of the html) the following:
    wp_title(''); bloginfo('name');
    This is good if there is only one language in the post title, but it will show both languages if there are two of them.
    You can see it here as an example.
    The same happens when using Extended Live Archives, please take a look at the same post title in the archives index that is displayed in this page
    Is there a way to correct this?
    Thanks a lot.

  547. Ruben 2006-08-10 / 7.52 pm

    Hi.
    First of all, thank you for your wonderful plug-in.
    I’m currently trying to implement it for a Korean, English, and Spanish blog. I followed all the instructions on this page including editing single.php, search.php, and index.php. I edited wp-config.php, and the polyglot.php as well. Then, i tried gettext by using poedit but after that
    Fatal error: Cannot instantiate non-existent class: cachedfilereader in /home/.fudge/rubenhan/mapsketcher.com/wp-includes/wp-l10n.php on line 67
    This error occurs. Could you help me out what’s the problem? Thank you.

  548. malyfred 2006-08-11 / 12.01 pm

    Sandy&ALL: Sorry for late answer.

    Sandy – your stats are generated by plugin that doesn’t respect hooks in WP. You must ask author of that plugin to correct it:(

  549. malyfred 2006-08-11 / 12.13 pm

    Andrew da Silva: The only untranslated stuff that I see on your page at the moment is generated by Poll plugin – ask author of that plugin about it.

  550. malyfred 2006-08-11 / 12.19 pm

    eduardo:: that’s known WP bug. I’ve suggested fix to the WP developers but it hasn’t been accepted because as they said – there are not supposed to be any tags (html or any other) in the post title…

    Everything should work fine if you use [lang_xxx ] instead of <lang_xxx> tags.

  551. malyfred 2006-08-11 / 12.21 pm

    Ruben:: what version of WP do you use?

  552. eduardo 2006-08-11 / 9.36 pm

    malyfred: Thanks a lot, that worked like a charm for the page title. Magical!

    Just one thing, and it is sort of a plugin imcompability: When using the ELA plugin, the title in the archives page still shows with both titles, and when using the [] tags even the tags show. You can see the problem here, please take a look down the posts list.
    That seems to be because the ELA plugin creates a cache for its use reading directly from the database, and not using WP’s functions.
    Would you, by any chance, take a look into this? I know this out of the scope of Polyglot, but maybe for the sake of plugin compability…

    Thank you once more!

  553. Andrea 2006-08-14 / 3.51 pm

    Hi, I’ve read your post about polyglot plugin and I’m trying to use it in my website. I have to use italian and english languages.
    I have the following problem:
    maybe that a post in italian has not to have a respective post in english. If I gettext only the italian text and I don’t set the text for the second language, in order to do not have this post in the english version, polyglot leaves the text in italian for both the language site version.

    I would like that if a post has to live only in the italian or in the english site version, in the other version it disappear.

    How can obtain this result?

    thank you

  554. Ruben 2006-08-15 / 5.43 pm

    Hey Malyfred, I’m using 2.04 currently. Is the installation process for 3 languages different from 2 languages?

  555. tricky 2006-08-15 / 11.15 pm

    Malyfed,

    Maybe you can use the Button Snap Class by Owen Winkler to wrap the lang tags around text. I see a lot of potential on your plugin. Have you thought about improving the write post window and providing double entry/excerpt/title? so it automatically gets posted with the lang tags. I’m so happy about your script and the way it works.

  556. tricky 2006-08-15 / 11.16 pm

    here’s the link to the button snap class: http://redalt.com/wiki/Buttonsnap

  557. tricky 2006-08-16 / 4.46 am

    Malyfed,
    i’ve got a question.
    I have my WP lang set to es_ES so i can have my admin menu in Spanish. I just had to upload es_ES on my languages directory and update wp-conig-php. I installed your plugin and i was able to setup the language selector and i can write a post i both languages. Now, i’m trying to make my templates gettexted for english and spanish. So i added this as an example:

    And i added “Data Sheet” to es_ES.po/.mo
    and it works correctly when i loadmy blog, it translates it to spanish. Now, when i select english on the lang selector, i see the post content in english (which i wrote inside the tags) but i still see in spanish. I tried uploading a en.po/.mo file, that has the english text in both the original and translated fields.

    Is there any way to keep gettexted template text while having WP using another language for the admin panel?

  558. tricky 2006-08-16 / 4.47 am

    the code i was adding to my template was:

    _e(’Data Sheet’);

    (it didnt come up on my previous comment)

  559. tricky 2006-08-16 / 7.06 am

    Maybe my previous comments where a bit too confusing. When it comes to post language, it works fine. But when it comes to Categories or gettexted text inside my templates, it only works for the default language, which is Spanish. I created an en.po->en.mo file containing the same entries, but they are still shown in spanish. everywhere where i added spanish, i used “es”, on polyglot.php and the .mo file. And everywhere where i used english, i used “en”, on .mo and polyglot.php i also had to add

    $polyglot_settings['wplang']['en'] = ‘en’;

    any ideas on how to get _e(”text”) correctly translated on the non default langague?

  560. tricky 2006-08-16 / 8.10 am

    Soooooooooorrrrrry for all my comments.
    but i’ve seem to debug this.
    i’m using wp 2.0.4 and polyglot v2.0beta

    i’m echoing the WPLANG variable on my index.php to see if it changes when i change lang.

    as i wrote before, i have both “en” and “es” as languages, “es” being the default one in both wp-config.php and polyglot.php

    any of the langs i choose, only seem to affect the content of the post between the tags, as WPLANG still echoes “es”.

    i’ve trying to take a look at the code you use to define the current WPLANG between line 284 and 305 but i don’t know how to tell what’s wrong.

  561. Olly S 2006-08-22 / 10.15 am

    Hi there, I am trying to set up Polyglot for use on my blog for my restaurant in Beijing called Vineyard Cafe (shameless plug!). I want to do Chinese and English and am using the modified Polyglot file done by solowoo.com

    Unfortunately I keep getting this error when you click the language links:

    Warning: Cannot modify header information – headers already sent by (output started at /home/.helmsley/omstedall/vineyardcafe.cn/wp-content/plugins/polyglot/polyglot.php:1) in /home/.helmsley/omstedall/vineyardcafe.cn/wp-content/plugins/polyglot/polyglot.php on line 143

    Fatal error: Cannot instantiate non-existent class: cachedfilereader in /home/.helmsley/omstedall/vineyardcafe.cn/wp-includes/wp-l10n.php on line 67

    Can anybody help me please?

  562. Cedric 2006-08-22 / 10.16 am

    I’ve got some problems to localize a plugin using the load_plugin_textdomain() function: I placed the .mo file in my plugin directory and uses the _e($text, $domain) however there is no tranlation appearing… do you have any clue ? what am I doing wrong ? I’m following this doc: http://codex.wordpress.org/Writing_a_Plugin#Localizing_Plugins

  563. dtone 2006-08-22 / 11.47 pm

    question:

    does this allow people to use the admin (dashboard) in another language, ie Spanish?

    thanks,

    d

  564. Lum 2006-08-23 / 4.56 pm

    Hi, I don’t if you did answer to this question. It is possible to have the language list into a dropdown list? Thanks

  565. Christine 2006-08-23 / 5.47 pm

    Hi,

    thanks for your plugin! It’s working fine. Just one question: I’m using wordpress as a CMS and therefore using just pages. If I give pages two versions of names (one in german and one in english) with the option, it will show BOTH names in the sidebar, but the right name as title for the page (in the content area). Do you know how to fix this?

    You’ll see the problem on this page:
    http://mmk.f4.fhtw-berlin.de/?page_id=43&lang_view=en
    The title is “Spenden” in german, “Donate” in english, its appearing well in the content area, but both on the sidebar.

    Hope you can help me…
    Thanks,
    Christine

  566. Christine 2006-08-23 / 9.30 pm

    Thanks again, I found the solution. Its a call of the function lang_picker_respect_more($peer->post_title);
    in the plugin, which displays the peer pages.

  567. Christine 2006-08-23 / 9.50 pm

    Hi again,

    I have another question :-). I’d like to have that if a user choses the english version for a post, this stays the prefered language, so that when he clicks on another page (which is available in english) it is displayed directly in english and not in german. I know that there is the

    if(function_exists('polyglot_list_langs')){
    polyglot_list_langs(false);
    }

    part for the sidebar, but I’d like to have the language option in the article (loop), not in the sidebar. I tried to put the mentioned code in the loop, but it did not work (actually there where two lines of “english version”, strange…).

    Do you know a solution?

    Thanks!
    Christine

  568. dtone 2006-08-24 / 7.37 pm

    in what file can you change the header (of the window) to read something different than http://mysite.com/lang-pref/es/ and mysite/lang-pref/en?

    I know it should be simple…

    thanks,

    d

  569. mr.mark 2006-08-25 / 3.09 pm

    hey malyfred.
    first i wanna say your polyglot kicks asses. but i cant figure one thing out.
    i am trying to get the gettexed thingy to work, but it wont translate my menu titles. e.g. “Pages” wont translate to “Pagina’s”
    i already added in my sidebar the “ thing and still it only shows the “Pages” title. .mo file is in the correct dir and also the name ‘Pages’ is correctly given in the .mo file.
    can you please give me some help? thnx!

  570. mr.mark 2006-08-25 / 3.10 pm

    the thing i mean is i already added the thing. it got deleted somehow. sorry

  571. mr.mark 2006-08-25 / 3.11 pm

    anyway, i added the _e(’Pages’) thing.

  572. tricky 2006-08-28 / 4.59 am

    mr.mark, i think we are having the same problem.

    can you add this maybe on your sidebar and see if the WPLANG variable changes when you change the language:

    it should change with the language you choose in order to get gettext working. It doesn’t for me, but at least you can debug it this way.

  573. mr.mark 2006-08-30 / 9.15 am

    tricky,
    i’m sorry, but what do i have to add to my sidebar? i cant see what you are pointing at. maybe you can send me an email instead. the address will be mark[A]soulcreeper.net.
    thnx a lot.

  574. tricky 2006-08-30 / 5.10 pm

    anyone got succefully working the gettexted function? i still cant get the plugin to change WPLANG, even if i can get it to pick between 2 langs when it comes to display the posts and post titles.

    Any other way to get the theme translated?

  575. tricky 2006-08-30 / 5.18 pm

    is there any way to “hardcode” lang selection on themes if gettext doesnt work?

    something like:

    if lang = es; then {echo CATEGORIA}
    if lang = en; then {echo CATEGORY}

    ??

  576. mr.mark 2006-08-31 / 8.29 am

    i entered the debug WPLANG echoing to my sidebar in my website but neither could i get that langcode showing up when changing languages.
    isnt there the plugin maker gonna figure something out, please?

  577. Roberto Gorjão 2006-08-31 / 6.04 pm

    Hi! Congratulations and many thanks for your plugin!
    I have a problem though: Excerpts appear in feed readers with both languages and with the lang tags. I already have this filter in the polyglot file: add_filter(’the_excerpt’, ‘lang_picker_respect_more’,1);
    What should I do more?
    Thank you.
    Roberto

  578. tricky 2006-09-01 / 7.13 am

    i don’t know what my problem can be.
    $locale gets set to the right chosen lang, while WPLANG is always stuck to default lang…

  579. tricky 2006-09-03 / 9.02 am

    When i use wp_list_cats, i get the following text:

    Project-Id-Version: WordPress 2.0 es_ES Formal Beta POT-Creation-Date: 2005-10-05 22:49+0200 PO-Revision-Date: 2006-08-16 00:35-0400 Last-Translator: Language-Team: wordpress-es MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Poedit-SourceCharset: utf-8 X-Poedit-KeywordsList: __;_e X-Poedit-Basepath: D:\wordpress-2\wordpress\ X-Poedit-Language: Spanish X-Poedit-Country: SPAIN X-Poedit-SearchPath-0: .

  580. Pedro 2006-09-03 / 12.03 pm

    First of all, thanks very much for this most useful plugin, malyfred.

    In my blog I’ve set up one RSS link for each language. However, the lists of blog entries returned by either RSS feed are both equal. I had imagined that the lang_view=xx parameter would be added to the URL of each entry in the RSS feed list of posts.

    The post titles in the RSS feeds are shown in the corresponding language, but the URLs of those posts are the same in both RSS feeds.

    Is there something I should be doing to get the desired behaviour?

    Thanks very much,

  581. David 2006-09-07 / 10.38 pm

    Hi!
    Great plugin! Really!
    But… a question… isn’t there a widget for the sidebar widgets? I mean, the one made by Automattic.

    Thanks!

    David

    P.S.: I can connect only from my mobile, so, please, would you kindly answer to my mail? Thanks so much!

  582. David 2006-09-07 / 11.10 pm

    Sorry, created it on my own with widget_polyglot_init() and that function name collided with yours… I’ve found your widget this way… Lol, I’m crazy, I know.

    Cheers,
    David

  583. bo 2006-09-14 / 3.27 am

    hey malyfred,

    installed polyglot and it works great. cheers for that. there’s one thing though. i would like to have the flags for the different languages centered next to each other and it’s really bugging me out. i’m no css-expert, but usually i get it right after a few days. not this time… help?
    cheers for that, bo

  584. ludovick 2006-09-18 / 1.36 pm

    Hello, I have a strange bug :

    Warning: Cannot modify header information – headers already sent by (output started at /var/www/html/new/wp-content/plugins/polyglot2/polyglot.php:1) in /var/www/html/new/wp-content/plugins/polyglot2/polyglot.php on line 243

    please someone help… ;(

  585. malyfred 2006-09-19 / 3.44 pm

    ludovick:: http://codex.wordpress.org/FAQ_Troubleshooting#How_do_I_solve_the_Headers_already_sent_warning_problem.3F
    Your problem is probably caused by UTF BOM which is not supported by your text editor. You can use one of many good editors which are fully supporting UTF – e.g. http://notepad-plus.sourceforge.net/uk/site.htm

  586. Fredrik 2006-09-25 / 7.56 am

    Hi there,
    I am trying to use Polyglot on my 3K2 (K2) theme. It does not perform the way I want to.

    I am new to this…

    1. I cannot get the flags to show up without the dot and also after the post title. I don’t undestand where to put the code as you have addressed this issue earlier.

    2. I have a list of latest entries in my sidebar. When I use in the title, both title as well as the code show up. is that right..?

    A great plugin! Good work!!

  587. rokur 2006-09-26 / 11.06 am

    Hi Fredrik. I had the same problem as you yesterday, also with K2, and managed to solve your first question…

    Put this above the line beginning with “

  588. Lum 2006-09-26 / 11.41 pm

    I’ve a few question about Polyglot, I hope someone can help me…

    1. Despite I’ve modified polyglot.php file choosing the various time and date format, they don’t change choosing different languages, they remain in english. If a use a xx_XX .mo file they change (but Poliglot doesn’t work with them), but with a xx.mo file this don’t work. I use EventCalendar3 too, and I noticed also with it.

    2. I can’t manage to get a post/page title in alla my languages. I’ve 4 languages setted, and if I create a post title like title

  589. rokur 2006-09-27 / 12.39 am

    Right, I made a mess there at 587. What I meant to say was: Put this above the line beginning with “The following two sections are for a noteworthy plugin”, appr. line 100

      ', '', '', '');
    lp_other_langs(' ',' ', ' ', ' ', ' ');
    }?>

  590. rokur 2006-09-27 / 12.41 am

    Gee. I’m sorry Fredrik, cannot figure out how to post code as comment here. Will use your contact-page instead.

  591. Lysiane 2006-09-29 / 1.01 am

    Hello, I have been using your plugin with great success on my blog. I haven’t made every element of it really multilingual, though. Would you know how to apply this to the archives links (not the URLs, but just the way the archives can be displayed in the sidebar) so I can have my monthly archives in English, French and German, too ?

    I would appreciate it very much, and thank you in advance.

  592. Eugen 2006-10-02 / 6.24 pm

    Hello,
    I have changed the polyglot.php a little so that instead of lists only now creation of drop down lists is possible, too.

    An example and all info can be found in my Blog:

  593. Felix 2006-10-05 / 11.45 am

    Thanks for this great plugin!
    At first I had some trouble with the links to other languages in a post, because the slash between “lang/xx” an the post URI was missing. I don’t know why this happened. Finally I fixed by adding a leading slash in polyglot.php, line 645 where it says “uri_helper= …”.
    Maybe there is another solution for this iussue as it seems to be a specific problem of my blog…

    Another question: If I want to be redirected to the translated version of the index.php instead to single.php, where do have to change and what? So I’d like to change only the excerpt of the post to the other language but stay on the page where I am. Is this understandable? :)

  594. marco 2006-10-10 / 5.13 pm

    hi, i just installed your wnderfull plugin and it works fine. on question i do have: i am using text instead of the flags. how can i change the style of the used (or set as main language) language? if i changed the language into english i would like to change the word english as bold font. probably it is realy simple but i need help :) tnx, marco

  595. opio 2006-10-12 / 2.11 pm

    hi, i use polyglot (great plugin BTW!!!) and have the title of my pages in two languages like this (without spaces):
    [ lang_pt ] empresa [ /lang_pt ][ lang_en ]company[ /lang_en ]

    i installed the sitemap plugin and, since it uses the title field to generate the sitemap, it is generating sitemaps with the polyglot language tags.

    is there a quick fix to make the sitemap appear in both languages without too much hassle?

  596. amanda 2006-10-12 / 6.10 pm

    I’m trying to get polyglot running and I think I’ve sorted most of it out but I am getting an error when I try to switch languages. My blog lives in a directory (called “blog”!), and selecting either available language gives me this URL:

    http://www.example.com/blog/lang-pref/en/

    (it is a dev site so I don’t want to share the URL) and I get a file not found error for that URL.

    Did I miss a step? I added the wp-lang string in my wp-config.php file. I edited polyglot.php.

    Is this an htaccess problem?

  597. copyesfera 2006-10-14 / 4.27 pm

    Hello,

    I belive you can give me the following info: Which is the varible that has got the ISO code of the langueage that has been choosen by a visitor?

    I hope you cant understand my particular english :D
    Lots of thanks

  598. Kent 2006-10-19 / 7.35 am

    Hi!

    Just tried to add your polyglot plugin. I posted a test post, and when I try to click the flag to get the second language, I just get this error:

    The requested URL /archives/2006/10/19/test/lang/no/ was not found on this server.

    As you can see, it links to my archives. That can’t be correct, right? What have I done wrong?

    When I look at the url on your flag, it is not to the archives.

    Thx for any help.

  599. Kent 2006-10-20 / 7.35 am

    How about making an installation guide to this plugin? Reading through 600 posts are kinda impossible…

  600. Federico 2006-10-20 / 4.49 pm

    Hi,
    I installed and activated Polyglot … but nothing happens. I tried with different themes, ISO files are renamed, but I don´t get it, what exactly are the steps I have to do after activating the plugin? (I am not good in php, but at least I know copy-paste ;)) (I use worpress 2.04).

  601. Pepe 2006-10-21 / 10.54 pm

    I’m with you Federico. I can’t get Polyglot to work in my Wordpress 2.0.4 blog. When I click to change language, nothing happens. The locale is not changed.

  602. Lum 2006-10-25 / 11.11 pm

    I have a strange problem. If I wrote a post in a certain language, which is different from visitor’s selected one, sometimes this post do not shows.
    It happens only with certain post, but I don’t know why.

  603. Tankmiche 2006-10-26 / 2.33 pm

    This plugin is just great! I had to work on it a bit to integrate with other plugins and my oermalink structure (I’m gonna post details about it in my blog).

    But.. thank yoooouuuu! Now it’s all ok, and I’ve got two feedburner feeds, one in english, the other in italian.

    ;-) I think it’s the best plugin I’ve ever had

  604. TankMiche\'s blog 2006-10-26 / 5.13 pm

    This blog is now fully polyglot…

    Well, what to say, if you have reached my weblog recently, you have certainly noticed a few new things:

    * There are two feed icons, both in italian and in english, with their feedburner’s counters
    ……

  605. brem 2006-10-26 / 9.19 pm

    Hi, I’m using polyglot for my bilingual blog (fr/en). It works almost perfectly.

    One of the major bugs I have right now is with the cookie.

    It seems the cookie is set to my browser’s language, but never is set to whatever language I choose thereafter.

    Could you help me find out where the bug is?

    Before I launched my blog, I tested it on another folder and it seemed to be working then.

    brem, puzzled.

  606. malyfred 2006-10-27 / 10.12 am

    brem:: Polyglot works in two “modes” – first, when you are just switching language of particular post (note the flag next to the post title on this web) and second, when you are switching the language settings in general (flags in the sidebar on this web).

    The second mode should set cookie the first one should not.

    The correspondent PHP functions are polyglot_other_langs for the “post mode” and polyglot_list_langs for the global settings.

  607. malyfred 2006-10-27 / 10.15 am

    Lum: Don’t you have <!–more–> in your “not showing” posts? Read http://wiki.fredfred.net/doku.php?id=wordpress:polyglot for more info

  608. jonny 2006-10-27 / 4.17 pm

    Has anyone been able to make polyglot work in the 3K2 theme ? Language switching in posts is working fine and the polyglot cookie is set to the right language. But, the rest of the template stays in the language set in the WPLANG variable.

  609. brem 2006-10-27 / 4.24 pm

    malyfred: it turns out part (if not all) of my problem is that if I accessed my blog through martinbreton.com, the cookie was set to martinbreton.com. But when I switched language, it set ANOTHER cookie at http://www.martinbreton.com. So depending on the domain (and thus subdomain) name, it was taking fr or en.

    I fixed the problem using… (and I’ll paste the code for any other users facing the same problem:

    .htaccess:

    # BEGIN WordPress

    Options +FollowSymLinks
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^martinbreton\.com$ [NC]
    RewriteRule ^(.*)$ http://www.martinbreton.com/$1 [R=301,L]
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]

    # END WordPress

    I’m totally not an expert in .htaccess files, so if you see a blatant mistake, tell me please!

    Now, two issues remain (that I can think of):

    sitemap plugin should tell google to parse the site twice, once for each language.

    ping technorati uses only the feed in one language, so the posts are not read in the other. I should be able to tell technorati that there are two feeds when I ping it.

    Any other things I’m forgetting?

    brem

  610. Tankmiche 2006-10-28 / 7.21 pm

    Got an idea, I’ll try to ajaxify the whole thing, to get faster results.. but I do not guarantee anything, of course!

  611. josep valls 2006-10-28 / 8.24 pm

    it isn’t working for me, in mozilla i always see the blog in english even if i set /lang-pref/es/
    when i open the blog in explorer i get Fatal error: Only variables can be passed by reference in wp\wp-includes\gettext.php on line 66
    my mozilla is in english, my explorer in spanish

  612. josep valls 2006-10-30 / 4.51 pm

    the problem with gettext.php on line 66 is something related with the php version and wp versions from 2.0.1, google solved it.
    now i’m having trobule with date and time formats, polyglot is not using the formats i specify
    $polyglot_settings['date_format']['ct']
    $polyglot_settings['time_format']['ct']

  613. Guy Bouchard 2006-11-02 / 5.35 pm

    Very useful plugin.

    How can i get my archive (by month) display in both language? Right now i only get french since my blogue is first (admin) in french. It would be nice for me to get english archive title (month) too.

    I use DD Sitemap generator (http://www.dagondesign.com/articles/sitemap-generator-plugin-for-wordpress/) to get sitemap. I modified the plugin to get page name in french or english (relative to language) but could i do the same thing with a hook in Polyglot?

    Thanks!

  614. pepe 2006-11-02 / 6.18 pm

    I finally managed to make Polyglot work in my blog. I had to remove the following two lines from the function load_textdomain() in /wp-includes/wp-l10n.php:

    if (isset($l10n[$domain]))
    return;

    Now, I can change the interface language.

  615. paco 2006-11-02 / 11.21 pm

    Is anyone using the K2 theme here ? I can’t get tags to work inside the K2 sidebar modules.

  616. Jose Amaral 2006-11-03 / 8.44 pm

    Your plugin is great!

    I’m trying to implement it on my new site.
    It’s a multilingual blog that I’m writing in 6 languages.

    Am having trouble in customizing.

    Could you please inform where I can get more detailed instructions.

    Thanks

    Jose Amaral

  617. Jean-Marc 2006-11-05 / 3.03 pm

    Hi Malyfred,

    Everything is working fine on my web site except categories names in the archive page.

    It’s written :
    Archives de la catégorie ‘ unclassed’
    but it must be :
    Archives de la catégorie ‘Non classé’

    You can see that the title is written in all languages with tags.

    In the archive.php is written :

    What do I need to do to have categories archives right written ?

    Thanks for that big and good job,

    Jean-Marc

  618. Jamaral 2006-11-05 / 3.04 pm

    Dear Malyfred,

    Thanks for your Polyglot plugin.

    Am starting a multilingual blog in 6 languages.
    As a beginner in PHP, am having difficulties in setting up the site to offer visitors the option for English, French, German, Italian and Portuguese.

    Please take a look at my blog:
    ( http://www.dujan.com.br/agendons/ )

    On my sidebar, the languages are displayed as follows:
    english, française, deutsch, pt, italiano and es.
    Above the header, the name polyglot has been added!?

    Have already defined the six languages in polyglot.php.

    Now, would like to fix the installation, to
    show:

    ..Languages on the sidebar, as a vertical list;

    .. If possible, would customize size and style of the fonts on the sidebar.

    Could you please help me to fix this?

    I thank you, in advance, for your kind attention.

    Jamaral

  619. Jean-Marc 2006-11-05 / 3.20 pm

    Sorry but in the precedent post is not everything written.
    I try to rewrite my message :

    Hi Malyfred,

    Everything is working fine on my web site except categories names in the archive page.

    It’s written :
    [quote]Archives de la catégorie ‘ unclassed’[/quote]

    but it must be :
    [quote]Archives de la catégorie ‘Non classé’[/quote]

    You can see that the title is written in all languages with tags.

    In the archive.php is written :

    [quote]

    [/quote]

    What do I need to do to have categories archives correctly written ?

    Thanks for that big and good job,

    Jean-Marc

  620. Jean-Marc 2006-11-05 / 3.21 pm

    Sorry, I’m not able to write part of code and part of the result from my web site.
    How to do ?

  621. Jean-Marc 2006-11-06 / 4.49 am

    Last try to let you see what’s my problem.

    I wrote my message again and add a spaces in tag sigle.

    Message is :

    Hi Malyfred,

    Everything is working fine on my web site except categories names in the archive page.

    It’s written :
    Archives de la catégorie ‘[ lang_fr ]Non classé[ /lang_fr ] [ lang_nl ]niet ingedeeld[ /lang_nl ] [ lang_en ]unclassed[ /lang_en ]‘

    but it must be :
    Archives de la catégorie ‘Non classé’

    You can see that the title is written in all languages with tags.

    In the archive.php is written :

    What do I need to do to have categories archives correctly written ?

    Thanks for that big and good job,

    Jean-Marc

  622. Alex 2006-11-09 / 6.04 pm

    Hi malyfred,
    I use WP 2.04 and when I activate this plugin i get a white page with those letters displayed: 

    Sometimes those letters are displayed below the editor when i write or modify a post.

    Also when i save a post, i get a completely white page.

    Everything is normal when i deactivate polyglot. Any ideas on that?

  623. josep valls 2006-11-11 / 9.14 pm

    en
    i’m desperate to make your plugin work. it seems that most of wordpress functions fail when anything with html entities. i’m trying to start a tri-lingual blog but both catalan and spanish languages have a lot of word with html entities. to start with, the function list_pages failed and left my sidebar blank, i had to hack a lot of code just to have the __() function display properly the “Pàgines” and “Páginas” labels. when it looked like working i tried to activate widgets and then it all broke again and this is to complicated for me.
    anyone have dealed with that and could give me some tips?

    es
    por favor necesito ayuda con el plugin polyglot y el wordpress en general, concretamente los widgets.

  624. jokerine 2006-11-13 / 2.28 pm

    I would really like to use your plugin, but it clashes with my admin pages as alex wrote. Please help as this is otherwise a wonderful tool.

  625. josep valls 2006-11-15 / 8.12 pm

    Still dealing with po files.
    I’ve noticed I’m having the same trouble as max in the post 535.
    My feed ?feed=rss2&lang_pref=ca is displaying the titles and texts properly un catalan (es-CA) but the language tag is set to en, is there any way to fix it? i can’t find out in the posts.
    en

    btw, Alex, if your pages appear broken, look if there is ANY html entity in your po files, titles, caregories… and remove it because the ampersand symbol & in html entities passed to the internal functions cause wordpress to misbehave.

  626. Alex 2006-11-16 / 1.36 am

    hi josep,

    since my .mo/.po file is german, there are tons of html entities for umlots as ä ö and ü. How do I deal with those?

  627. Ray 2006-11-17 / 5.43 am

    Hello,
    Before I get myself into setting up a new blog, and installing your plugin and learning how it works I want to know how many languages can be configured to run next to each other? I want a site to run 4 languages, with an option to add more. If it is intended to be just dual then just tell me and i wont get into it.
    Cheers,
    -Ray

  628. jokerine 2006-11-17 / 5.49 pm

    It works with as many languages as you want. And Josep thanx.

  629. jokerine 2006-11-18 / 5.39 pm

    I don’t have any mo files because I run wordpress in english and just want to translate the posts (for now)I removed the & in the theme files didn’t change anything. I suppose the wordpress files themselves will be allright uneditet, because wordpress should work withitself, and the same for all of us.
    J.

  630. Eric 2006-11-18 / 11.46 pm

    Hi,

    This is the plugin that would realy like to install but I get the following error:

    Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 144919 bytes) in /client/home/smead/docs/cidi/blog/wp-includes/streams.php on line 58

    What is using so much memory? please advise,
    Regards,
    Eric

  631. claudio 2006-11-20 / 9.32 pm

    Hi. my best compliments for your script!
    I’m tryng to fit it inside a kiwi lite
    canvas theme, without any success…
    I think it would be great for canvas users beein able to use it as well.
    I suck in programming… but it seems easy… (for anyone with a basic knolewdge of php)
    ‘, ”, ”, ”);
    }?>”
    to a canvas block block=(http://support.freshpursuits.com/documentation/show/Blocks)

    I tryed this, without any success:

    ‘, ”, ”, ”);
    }?>

    what i’m doing wrong???

    I wish to port my art/design portfolio from joomla to wordpress wich seems lighter and nicer.Specially using canvas and kiwi lite:)
    Here’s the link for canvas:
    http://www.freshpursuits.com/canvas/

    thanks! ciao

  632. Alex 2006-11-21 / 12.36 pm

    Now I did a fresh install of english WP 2.0.5 on a different Server. When I try to (de)activate Polyglot i get this message
    “Warning: Cannot modify header information – headers already sent by (output started at /myserverpath/wp-content/plugins/polyglot.php:1) in /myserverpath/wp-includes/pluggable-functions.php on line 269″

    Any ideat what’s going on?

  633. Cris 2006-11-22 / 2.23 pm

    Hi all and Malyfred!

    I am using Ployglot to produce a bi-lingual website English/Italian at http://www.underworld-game.net

    So far, so good.

    I would like to link myself to comments number 474 (stuffMC),497 (rags), 553 (andrea), summarizing my opinions as follows:

    1) We have a way to let visitors post bi-lingual by using tags [ lang_xx ], Okay.

    To my liking it’s somewhat optimistic to assume that a visitor understands that the site is bi-lingual and that (s)he has to use those tags.
    Normally visitors have no time and no will to read and learn.
    This would result in the admin (me) to have to go and edit all the comments to add language tags.

    Solution: I would like to hack Polyglot so that language tags are inserted by default and using the visitor’s preferred language IF no language tags have been placed.
    Is this already on the to-do list? If not, is anybody interested?

    1) There should be some way (option?) to avoid that no-translation-present posts appear.

    In my site most posts are in Italian although the default language is English.

    This gives the english visitors the annoying impression that the site is mostly work-in-progress.

    Solution: here again, I would like to add this option. Anybody interested?

    Finally, all my compliments and everlasting respect for having developed and distributed this wonderful and free tool.

  634. Thomas 2006-11-25 / 1.44 pm

    Did anybody made a hack for the “write a post” admin screen so people can choose their language clicking on a button instead of typing

  635. Andre Klaassen 2006-11-26 / 1.15 am

    This is exactly what i need, but I can’t get it to work. I put it in the right directory unpacked but see no flags and adding or shows no languages or flags…. do you have easy proper documentation?

  636. Andre Klaassen 2006-11-26 / 1.16 am

    Yes I did activate it :-)

  637. Alexander Prestmo 2006-11-26 / 4.02 pm

    Hey. I really think this plugin is great. After som fiddling it really does what i want. Great :))

    I don’t know if you will be releasing further upgrades of Polyglot, but I have one suggestion to improve it.

    It is quite much work to write the language tags manually and put them around every post you have. How about adding language buttons to the editor so you can mark the text and enclose the tag around it with a button?

    I’m not so good at PHP but I think it could be possible to detect your active languages from ‘knowlangs’ and pull out the name for the buttons from the name set in ‘trans’. The flags could be used for the WYSIWYG editor and pulled out from ‘flags’.

    Now Sawchuck buttons does this so you can edit it for the purpose, but this feature would be great to see in a further upgrade.

    :)

  638. Andrea Micheloni 2006-11-28 / 5.27 pm

    I’ve made a sort of integration with the sitemaps plugin for wordpress, you can find it here ;)

  639. joni 2006-11-28 / 7.56 pm

    Hi,

    Your plugin has a problem. I can’t have an english version of my blog unless I set WPLANG to ‘en’. mysite/lang-pref/en simply goes back to my default language (fr).

  640. Jesús 2006-11-29 / 9.16 pm

    Alex, I have the same problem, but not only (de)activating, also editing the categories.

    Warning: Cannot modify header information – headers already sent by (output started at /home/.bodacious/jesuscarrera/jesuscarrera.info/wp-content/plugins/polyglot2/polyglot.php:1) in /home/.bodacious/jesuscarrera/jesuscarrera.info/wp-includes/pluggable-functions.php on line 269

    Anyone have fixed it?

  641. Alex 2006-11-30 / 1.08 am

    Hi Jesus,
    yes, the solution is already on this page, look for comment 117, 172 and 585. I used notepad+ to edit the polyglot.php and it worked.

    BUT, i have still the problem with white pages on a different server. So it works on one server and i have white pages (the blog, the admin pages, everything) on another server.

    I guess it’s some apache option? Any hints?

  642. dams 2006-12-06 / 12.38 pm

    Hi! And thanks a lot for your plugin! Great, my site is quite now in 5 languages! Some improves yet but it works!
    My question is : how can I translate text written in other plugin forms? I’m using also “an other wordpress meta plugin”, “polls” and also “mailing list”, my dream is that I can write also with the the text in the forms of these plugins. how can I do that? thanks for answer

  643. dams 2006-12-07 / 1.48 pm

    it seems that the translation don’t work with the function ’single_cat_title’
    you can see and example in this page :
    http://mazuria.ecolodges.free.fr/?cat=37&lang_pref=fr
    have you already find this pb?
    thanks for answer!

  644. joni 2006-12-12 / 10.56 am

    Just one question,

    Is Polyglot compatible with Wordpress 2.1 ?

  645. Sebastian Picklum 2006-12-13 / 1.46 pm

    I’ve written a modification that will provide better integration of Polyglot into TinyMCE.

    You can find it here:
    http://www.picklum.net/2006/12/13/polyglot-support-for-wordpress-tinymce/

    Comments are welcome.

  646. r4m 2006-12-13 / 8.07 pm

    Hello, thanks fpr the very helpful plugin. I am not finished with experimenting with it. But I am very happy to have it.

    Only one thing: it did not generate xhtml-1.0 strict code in three lines. These are:
    $other_langs .= “&lang_view=$lang’”;
    $other_langs .= “?lang_view=$lang’”;
    $other_langs .= “&lang_view=$lang’”;

    The Problem are the primes(’) (do you call it “prime” in english?). When I deleted them, everything went fine.

    Thank you.

  647. Jesús 2006-12-13 / 8.16 pm

    Thanks Alex, but I was using Scite, a capable UTF8 editor. Oddly I have fixed the problem editing in 8-bit and changing the ñ in español for the HTML code.
    Hope this help someone else.

  648. J4R 2006-12-14 / 5.47 pm

    I’m completely newbie to this stuff. I’ve tried to configure the plug in for two languages (catalan and spanish) and although my default one is catalan, the main page always loads spanish texts. Any idea? Thanks in advance!

  649. meju 2006-12-16 / 10.45 pm

    Hi.

    Does anyone has valid link to download Language Picker. All links from here and even google leeds to nowhere.
    Can anyone publish it someware?
    thanks in advance

  650. bo 2006-12-16 / 11.58 pm

    hey,

    i have a question. i would like only the german rss-feed to appear when german is selected and the same for my english feed. so, how would i do that?
    thanks,
    bo

  651. MacKozer 2006-12-18 / 2.17 pm

    I am trying to install Polyglot into K2 theme, but after activation of the plugin I have a message on the screen above the admin panel:

    Warning: array_values() [function.array-values]: The argument should be an array in /home/carlow/ftp/mackozer/wp-content/themes/k2/options/app/sbm.php on line 468

    line 468 is like that: $tmp_modules = array_values($k2sbm_active_modules);

    Best regards

  652. Marcel 2006-12-19 / 3.50 pm

    I installed polyglot and created some posts in various languages. The only problem is that if I use the lp_other_langs() function, and I click on the resulting links I get the specific post (in the correct language) but in the “category” kind of display (just the plain post!), and it’s not shown in the main page with the sidebar.

    Any ideas?

    Marcel

  653. meju 2006-12-21 / 8.05 pm

    Hello again

    How should looks this line if i want flags next to, not one under another.

    ‘, ”, ”, ”);
    }?>

    thx in advance for help

  654. meju 2006-12-21 / 8.07 pm

    Hello again

    How should looks this line if i want flags next to, not one under another.

    ', '', '', '');
    }?>

    thx in advance

  655. meju 2006-12-21 / 8.11 pm

    Give up :)

    This part with on the top this site
    if(function_exists(’lp_other_langs’)) {

  656. Ein Hauch von Ewigkeit - Langauer.net 2006-12-27 / 8.07 pm

    Still in cold Germany?…

    I can’t figure it out… the Polyglot-Plugin is running nearly correct (finally!), but Firefox takes English for default now and IE7 chooses German as default language… If anybody has an idea, please comment, thanks! (comment means &#8…

  657. bo 2006-12-29 / 9.02 pm

    hey,

    that probably means that you have different default languages set in ff and ie. you can set it probably in options or internet options or something like that.

  658. Roberto Bellina 2007-01-11 / 4.19 pm

    Hi, I’m newbie with the wordpress thing. However, after configuring it on my local machine, I tried to configure this multilingual feature. I would like to have en-de-fr-it-es as flags for my WP2 interface…not the single posts localization…
    I downloaded all the .mo files I am interested in; however I don’t understand the way I have to configure the template files of my theme to work as expected…is there a tutorial for this?
    I went through all the comments here…but no way…Please help!

    Thank you

  659. Sale 2007-01-12 / 11.45 am

    Hi all!!
    I’m using this plugin on my website, and I have a question: is there a way to get parmalinks in different languages?

    Let me explain: suppose i wrote a post titled

    Hello

    Is there a way to get http://www.salatti.net/hello on the English version of the blog and http://www.salatti.net/ciao on the Italian one?

    TIA

  660. joni 2007-01-13 / 3.41 pm

    DOES THIS PLUGIN WORK WITH WORDPRESS 2.1 ?

    THANX

  661. Sea Jackal 2007-01-18 / 9.59 am

    Great, it works! (i am using WP 2.0.6).

    Instructions are clear but it would be better if you say that you must define define(’WPLANG’, ‘en’) in wp-conf.
    Setting other language such as define(’WPLANG’, ‘es’) will not work propertly (template would not change).
    Same as comment 639.

    Thanks a lot.

  662. rom 2007-01-18 / 12.42 pm

    Great plugin

    Only one ask because i can’t find the solution, i want to use the plugin to put entry in a lot of language.
    But i ve a problem.

    For example, i make my default language into english

    I post an entry like this :
    but i don’t want to put it into my default language, however an entry appears with the message Sorry, but this post is not available in English … i want that the post don’t appear.
    Like this if i post a comment in different language but not in the default language, it appears a comment (posted in by …) with nothing into the default language or i wish it appears no comment.

    If someone should help me
    Thanks

  663. Dnote 2007-01-20 / 1.00 am

    The language selection does not seam to work using polyglot_list_langs. This is because by blog does not start at index.php but at the root of my domain. Polyglot adds the prefered language parameter to my url and screws it up:

    http://www.domain.com/lang_pref/en

    which obviously does not exist on my site!!!

  664. Dnote 2007-01-20 / 1.37 am

    In fact it does not work at all. If you enter in the post, Wordpress will remove it. Am I suppost to enter in the wordpress editor or in the html editor? Either way, wordpress throws these tags away.

  665. Chris 2007-01-22 / 9.20 am

    I am having the same problem as Dnote I think… my site is at http://www.domain.com/wordpress/ and when I try to change languages from the blog homepage the links to go http://www.domain.com/wordpress/lang-pref... which won’t work. If I could make the language picker link to index.php in such cases (when not viewing ?p=x post), maybe I could get it working… ideas?

  666. brem 2007-01-23 / 8.10 pm

    the plug-in seems broken with 2.0.7.
    when I call get_links_list() from php, the link categories aren’t being translated. Is it a hook that isn’t hooked anymore? What should I do?

    Is it fixed in 2.1?

  667. gennaro 2007-01-25 / 10.52 pm

    This looks like I great plugin!
    But it does not work any longer for my home page with Wordpress 2.1. Seems to work on other pages and on posts, but they changed home page management in vers. 2.1…
    I have not been able to set up the plugin for Preferred language selection. I do have WPLANG = ‘en’ in the conf file, but changing the preferred language dose not have consistent effects.
    Would it be possible to switch to a different template upon changing the language?

  668. maryse 2007-01-28 / 8.04 pm

    Hello,
    I’m having trouble with the gettext part. In my sidebar I put something like this:
    php _e(’Newsletter’); I downloaded the french .po file. I added the translation for Newsletter and then I opened it in poEdit and saved it as .mo. I uploaded this file.
    But nothing happens when I switch the language. Am I missing a step?

    Also, I am using the EventCalendar (http://wpcal.firetree.net/) and the excerpts of the posts I post to this calendar are not translated. When the full text appears, then there is not problem, it works. It’s just the excerpts (if you click on Archive or Activites).

    Thanks for any help.

  669. Sylvain 2007-01-29 / 2.55 am

    Hi,

    I’ve just upgraded to WP 2.1 and the plugin works fine, except for pages. If I click on another language to see only that page in another language, I get:

    “Sorry, no posts matched your criteria.”

    If I change the language of the whole blog first, I can see the page in a different language without any problem. Any idea?

  670. Qian Qin 2007-01-29 / 5.16 am

    Hi,
    I have made some changes to Polyglot so it works with “Google XML Sitemaps”, also fixed some bugs I found. I didn’t want to post the complete files here, so I put them on my website. It would be great if you could include them in your next release.

    Qian

  671. maryse 2007-01-30 / 7.35 am

    Hello, You can forget about the second part of my question, as I have stopped using the EventCalendar. But I am still having trouble with the gettext part mentionned in my first post.

    thanks!

  672. adrian 2007-01-30 / 6.59 pm

    hi there,
    iam building a blog ntoo right now but i have a problem.

    When i open the page with mozilla english and espanol are displayed under the language tab but when i switch to IE it doesn’t show them anymore the same in safari on a mac….

    you know why ? any suggestions ?

    thx in advance

  673. adrian 2007-01-30 / 7.04 pm

    second question, which just came up.

    as soon as i write letters like ö,ü,ä in the articles of the blog, which are used in german the selections english and espanol dispappear under the language in IE as well as mozilla ?

    u got a solution to that too ?

    thx alot in advance !

    adrian

  674. Milan Tucek 2007-01-31 / 12.24 pm

    It is compatible width Wordpress 2.1 ? Thanks

  675. Marek Klein 2007-01-31 / 1.53 pm

    Bez problemov ho pouzivam aj vo verzii 2.1I use it without problems in WP2.1

  676. adrian 2007-02-01 / 5.36 pm

    ok first problem solved it was an issue with the flags…

    but still as soon as i write ñ , ä , ö or ü it doesn’t display the letters and the language selection tabs disappear.

    u know why ?

    regards

  677. mooniv 2007-02-01 / 5.54 pm

    thanks for great plugin. What should I do to use the function the_date() to show the right results? Do I have to change the date format?or something else? I dont know what problem with mysite. plz malyfred

  678. Milan Tucek 2007-02-04 / 5.33 pm

    TO: Marek Klein 31. 1. 2007 / 13.53, Poradite mi prosim, jak se s timto pluginem naklada? Nejak jsem to nepochopil. Plugin jsem aktivoval, ale jak udelat dvojazycne kategorie a dvojazycny clanky? Dekuji

  679. josep valls 2007-02-11 / 8.46 pm

    i’m having some problems commented and i’ll try to solve myself (like the monthly archives not being translated). what about the new version of the plugin you said to correct all these?

  680. josep valls 2007-02-11 / 8.52 pm

    i red that some people is having trouble translating the dates and so. you answered that php could only work with english format dates.
    what i put the formatting strings in my POT file, so my date and time prints looks like

    and I used only numbers, not month names

    msgid “F jS, Y”
    msgstr “d/m/Y”

    msgid “F jS, Y”
    msgstr “m-d-Y”

    hope it helps someone with the same problem

  681. Alex 2007-02-13 / 3.13 am

    I just noticed: the funny behaviour also seems to go away if I deactivate Breadcrumbs XT.
    Do you know of a method to have yours and that one live side by side and still be able to use sitewide cookie based lang switching?
    Thank You!

  682. shaun 2007-02-13 / 7.10 pm

    We are trying to integrate this into our site’s blog but are having real problems trying to set up posts in different languages. we have set the default language to the users navigation language on our site, but when i try and write a post with the tags, it removes all the text and tags for languages that are not my current navigation language. Any help greatly appreciated

  683. Bruno 2007-02-15 / 6.44 pm

    Hi,

    I am trying to put my blog in English and Portuguese with polyglot.

    Almost everything is working nice, excepted when I try to change the language at root page, the server thinks /lang-pref/en/ or /lang-pref/pt/ are folders and returns 404 error.

    Does anyone knows how can I solve my problem?

    Thanks in advance for all.

  684. malyfred 2007-02-15 / 6.45 pm

    shaun:: there are no modifications made to the text before it’s saved to the DB therefore the tags and the text must be there. The texts are “filtered” only for “presentation”. Do you use WYSIWYG editor?

  685. Pablo Zinc 2007-02-17 / 3.29 am

    Hi,

    I’ve to thank you for such a wonderful plugin. I’m afraid I’m also having problems with the page titles (I guess I’ll have the same with post titles) in the sidebar tree generated by another plugin (WP-dTree http://www.silpstream.com/blog/).

    I’ve been trying different things, but I’m not an expert on PHP; I’d love to keep on using the WP-dTree plugin, but it shows both languages -i.e. a page named ‘Canciones’ (spanish) and ‘Songs’ (english), appear like ‘CancionesSongs’…

    Otherwise, it works ok. I’ve been trying to find how to fix it for hours, and reading lots of comments, but nothing… Could anyone help me?

    Thanks a lot.

    PS: You can see the bug in this page: http://www.mrzinc.com/canciones/ on the sidebar, under ‘Paginas’ (I’ve not translated everyting yet, just testing)

  686. bo 2007-02-18 / 8.33 pm

    hey, had the same problem with a few of the plugins i was using. polyglot provides a function lang_picker_respect_more().

    just use it directly in the plugin files and wrap it around the functions that are responsible for the titles.

    here’s an example from the plug&play google map plugin:

    before:
    $title = addslashes(get_the_title());

    after:
    $title = addslashes(lang_picker_respect_more(get_the_title()));

    might look different in your plugin.
    hope that helps, bo

  687. Luca 2007-02-19 / 1.41 am

    Hello,

    I installed Polyglot 2.0 and WP-Cache 2.1.0. Whenever I enable WP-Cache, languages start changing randomly. If I disable it, everything works again. Unfortunately the load on the webserver is very high without WP-Cache.

    I read above that some people where able to fix this same problem by using a cookie name that starts with “wordpress”, but unfortunately the problem persists.
    If there is anything else that you would like to know about my setup, please let me know. Thanks

  688. Bernhard 2007-02-19 / 5.47 pm

    Hi there,

    thanks for this great plugin. I have been searching something like this for days now. Tried several plugins, and yours is definitely the best. Excellent work!

  689. Kim 2007-02-20 / 10.21 am

    Hey, im tryin to get this to work, but im not sure i use the right code for my header file.
    I want to always show the flags for the languages i use, but right now when im using this code in header:
    “‘, ”, ‘ ‘, ‘ ‘);
    }?>”
    So there always will be “in my world” 3 flags on the site, never the less if there have been decided any language ?

    Anyone can help with the right code or setting for this ?

    Best regards

    Kim

  690. Kim 2007-02-20 / 10.22 am

    Whoops, sorry, this is the code

    ‘, ”, ‘ ‘, ‘ ‘);
    }?>

  691. Kim 2007-02-20 / 10.23 am

    Sorry, the code mess up for me, i use the code listed under “Language versions”

  692. dngpng 2007-02-20 / 10.40 pm

    Hello, thanks for writing such an awesome plugin. I’m using it now for my blog and have done a little hack to the plugin Extended Live Archive to make it work with Polyglot. It could solve the problem that comment #552 has mentioned before.

  693. Mary 2007-02-25 / 5.24 pm

    Hello, just wanted to say ( without any originality ) that your plugin is just perfect !

    I just have one little question for everyone hacking and coding : how do you translate post title ? I’ve read each and every comment but I’m surely idiot since I can’t find the code nor how to do it by myself.

  694. bo 2007-02-26 / 12.07 am

    hey, use in the title field while writing your post ;)

  695. bo 2007-02-26 / 12.09 am

    hey, use in the title field while writing your post ;)

  696. bo 2007-02-26 / 12.12 am

    can’t figure out how to post code here… anyway, just add the language tags in the title bar when you write the post. just like you do for the content

  697. Angi 2007-03-06 / 4.18 am

    Hello! I have installed your plugin and put the language changer in my sidebar after changing all the Text in my template to gettext. But when I click on english, nothing happens! (The Posts are not yet translated, so don’t wonder about that. I mean just the titles of my sidebar features, 1 comment/0 comments… and so on.)
    What could be the reason for that? If i change the language to en in my wp-config.php, it turns on english. :(
    greetz, angi

  698. to.rben 2007-03-14 / 10.48 pm

    Hi,
    thanks for the great plugin! What about adding a ‘rel=”nofollow”‘ to the /lang-pref/XX/ links inside the polyglot_list_langs() function?

    I did this for me in order to prevent Google from indexing unnecessary URLs. The articles available in different languages will still be indexed, since they contain extra links (/lang/XX/ instead of /lang-pref/XX).

    Regards,
    Torben

  699. Pepe 2007-03-14 / 10.53 pm

    if Polyglot doesn’t work for you then you can try the Language Switcher plugin from http://poplarware.com/languageplugin.html, which is based on Polyglot.

  700. Neriodavid 2007-03-15 / 9.40 am

    The new 2.0 version, function lp_other_langs() seems can’t get the language maintained. That is, the link of the post Title seems doesn’t add the …/lang/xx at the end when you change the language version of a post. However, the strange thing is that the fucntion polyglot_list_langs( true | false ) can make the language maintained, even though,after you switched the language, the links on the page don’t append the “/lang/xx” at the end. Do this achieved via cookies or session status?
    Another interested think I want to know is that how I can make the RSS feed change dynamically according the option of the language? Thanks.

  701. Neriodavid 2007-03-15 / 9.44 am

    Oh, another minor problem I found is that on the Admin’s login page, at at the bottom, the text link of “Back to xxx” is not shown correct language, it is shown the raw text like this “xxxx…”.

    Do anyone have the same problmes as I have?

  702. Neriodavid 2007-03-15 / 9.45 am

    Oh, another minor problem I found is that on the Admin’s login page, at at the bottom, the text link of “Back to xxx” is not shown correct language, it is shown the raw text like this “xxxx…”.

    Does anyone have the same problmes as I have?

  703. Julien Lamarche 2007-03-18 / 4.51 pm

    Malyfred,

    In order to make the title multilingual, I added the following instruction.

    add_filter(’bloginfo’, ‘lang_picker_respect_more’, 1);

    in polyglot.php

    Do you see this as causing potential bugs?

  704. Michael 2007-03-18 / 9.49 pm

    Hi Malyfred

    i have just updated to WP 2.1.2 and also polyglot 2. Nothing works…
    Looks as if my htaccess is not OK with permalinks.
    Do you have a sample htaccess for any type of permalinks without the index.php?
    Thank you
    Michael

  705. Pablo Zinc 2007-03-23 / 8.59 pm

    Thank you very much, Bo (comment 686); it wasn’t easy, because the wp-tree is complicated, but at last it works!!!

    Sincerely, you make my day :-)

  706. Stargazer 2007-03-27 / 1.54 pm

    Thanks a lot for the Plugin. I am using it since quite a time now. As a small update for working with the latest version you should add another filter for the title:

    add_filter(’wp_title’,'polyglot_filter’,1);

    this should do the trick.

    Stargazer

  707. JR 2007-04-12 / 1.45 pm

    Hi,
    Is it possible to use [lang_x] tags outside posts, in example inside template code?

  708. Alex 2007-04-18 / 11.24 pm

    Hello, and thanks for your plugin,
    My question would be very simple for you.
    Is it possible to display the Flags and the Label Text? Instaid of only the flag or the text.
    So I would be like this:

    Image-Flag-French : Français
    Image-Flash-English : English

    Thanks for your help

    Alex

  709. Dirk 2007-04-19 / 1.58 pm

    JR #707: you can use polyglot_get_lang() to check the current language and then put out specific content inside of template code.

  710. malyfred 2007-04-19 / 6.41 pm

    #707+#709:
    … or you can use the polyglot_filter function or it’s shortcuts:


    echo p__("[lang_x]some x text[/lang_x][lang_y]some y text[/lang_y]");

    or even shorter:

    p__e("[lang_x]some x text[/lang_x][lang_y]some y text[/lang_y]");

  711. Alex 2007-04-20 / 6.38 pm

    Thank you both for your answer. I’m a little bit lost, I’ve inserted this code :
    echo p__(”[lang_fr]Français[lang_ en]English[/lang_ en]“);

    on line 707 and 709. I don’t think it’s the right way to do it ’cause it’s not working.

    Sorry

    Alex

  712. malyfred 2007-04-21 / 9.48 am

    @711 And what do you get then? This is how I use Polyglot in my templates.

  713. Toure 2007-04-22 / 6.53 pm

    Sweet, this is what I have been looking for. However, what about completely setting your blog in two languages; I meant the posts themselves. I would like to have to version of my posts.
    Thanks for any help there.

  714. bo 2007-04-22 / 8.57 pm

    hey maylfred,

    single_cat_title doesn’t translate for me. there is this in polyglot.php though:
    add_filter(’single_cat_title’, ‘polyglot_filter’, 1);

    any idea on how to get this to work? thanks a lot, bo

  715. cee 2007-05-03 / 9.38 am

    Hello,
    Is it possible to have the polyglot_list_langs() function display the other languages, and not the one which is currently selected?

    For example, I am working on a site which will be available in both Chinese & English. I’d like a text link to appear in the header which allows the user to switch to Chinese if English is displayed, and vice-versa. I don’t want to have a button to display English if English is already on.

    Please let me know if this is possible!

    Thanks!

  716. cee 2007-05-03 / 9.52 am

    OK – I managed to fix it myself, with a little CSS hack. I just set the ‘current_language_item’ to display:none in my CSS file. Works for me! :)

  717. Thale 2007-05-10 / 2.37 pm

    Any news about permalinks? I would use /en/ for english instead of the original redirect string. Anyone? Thanks by advance (my website is written in french by default).

  718. malyfred 2007-05-10 / 11.27 pm

    @thale yes, try version 2.0. Permalinks are now fully supported. I forgot to change the text of the post.

  719. malyfred 2007-05-10 / 11.29 pm

    @bo What version of Wordpress do you use?

  720. Michael 2007-05-19 / 8.43 pm

    Hi malyfred – Thanks for a nice plugin.
    Are there an update for WP2.2 on its way?

  721. Arnoud 2007-05-20 / 10.52 am

    Hi, very nice plugin!
    Only since Wordpress 2.2 the title’s in the browser show the [lang] tags instead of just the text.

    How can this be fixed?

  722. malyfred 2007-05-20 / 1.45 pm

    @Michael What’s wrong with version 2.2? I’ll test it this week.

  723. malyfred 2007-05-20 / 1.46 pm

    @Arnoud There used to be some issues about this in older versions of WP. I have to check what’s new in 2.2.

  724. Sebastian Gerhard 2007-05-22 / 7.05 pm

    @721 and other People who have the wordpress title problem (Titel is not parsed correctly) with polyglot:

    add this line of code:

    add_filter(’wp_title’,'polyglot_filter’,1);

    at around line 181 in polyglot.php

  725. Sebastian 2007-05-22 / 7.13 pm

    sorry, typo:

    use this:
    add_filter(’wp_title’,'polyglot_filter’,1);

  726. alessandro 2007-05-23 / 10.20 am

    Hi, I’ve added a filter for textwidget:

    // ABP: filter if not back-end
    if(strpos($_SERVER['REQUEST_URI'], ‘wp-admin’) === false){
    add_filter(’option_widget_text’, ‘polyglot_filter_array’, 10, 1);
    }

    // Function for array filtering
    /**
    * ABP: filter array values
    */
    function &polyglot_filter_array(&$ar){
    foreach($ar as $k => $v){
    if(is_array($v)){
    $ar[$k] = polyglot_filter_array($v);
    } else {
    $ar[$k] = polyglot_filter($v);
    }
    }
    return $ar;
    }

    Hope it helps.

  727. malyfred 2007-05-27 / 10.30 am

    @alessandro thank you, I’ll add it to the future release.

  728. CyprusGuy 2007-05-28 / 1.33 pm

    Hi there,
    I just installed polyglot2.2 working on Wordpress 2.1. I still have some problems in figuring ouot how I would do that gettexted thing but I guess I will manage somehow. My biggest difficulty is that I cannot get the flag images shown. I get the list alright but not the images. I’ve put this function on the sidebar

    if(function_exists(’polyglot_list_langs’)){
    polyglot_list_langs(false);
    }

    and the respective one in the polyglot.php is set to TRUE.
    My blog is on a subdomain named blog.alkisdemetriou.com and the polyglot plugin is on its own directories under the WP Plugin directory named Polyglot2. I changed the respective url in the polyglot .php but I still cannot have the images shown.

    Could anyone give me some tips?
    The same goes for the message when a translation is not existent: It doesn’t show at all.

    I would really appreciate an answer.

    Thanks

  729. Rolf 2007-05-31 / 5.33 pm

    This plugin does exactly what I was looking for. However, is it possible to disable the function that automatically detects the visitor’s language? It sounds like a nice option and works fine in IE7, but Firefox doesn’t seem to listen–although I told it to show Dutch content by default, it keeps giving me English text first.

    I already tried playing with the code a bit, but I really have no idea what I’m doing and my actions have had either no effect or broke the script. Could you tell me what to do? I couldn’t find the answer in the 728 comments above here, although I may very well have overseen something.

    Thanks in advance.

  730. malyfred 2007-06-01 / 7.52 pm

    @Rolf $polyglot_settings['default_lang'] = 'nl'; should do the trick. Also as soon as you click yourdomain/lang-pref/nl/ ‘nl’ is saved to the cookie and then respected properly.

  731. Alexey Maurov 2007-06-02 / 5.39 am

    Hi, very nice plugin! Thanks.
    >>546This is good if there is only one >>language in the post title, but it will >>show both languages if there are two of >>them.
    I had the same problem. I use wp_title();
    I found a solution to the problem:
    http://trac.wordpress.org/attachment/ticket/3755/general-template.php.diff
    Thanks jhodgdon.

  732. Taeke 2007-06-03 / 4.19 pm

    Really nice plugin!
    I’ve got a little problem though. When I try to switch languages on the home page (index.php) I get a “No input file specified” error. All other archives etc work perfectly, what’s the problem here?

  733. malyfred 2007-06-04 / 9.48 am

    @Taeke Hard to say. Could you give me a link? It looks a bit like misconfigured web server.

  734. David 2007-06-09 / 7.26 pm

    Hi, after a second try I managed to get your plugin to work on my site. However, I use a redirect url ‘www.redirecturl.com’ that points to my blog ‘www.myblog.com/blog’. Whenever I access my page via the redirect url the translator I put in the sidebar doesn’t work. I.e. it tries to call an url that doesn’t exist ‘www.redirecturl.com/lang_pref/en/’ and thus I get an error. Is there any way to change the url to which the links in the sidebar points? ‘www.myblog.com/blog/lang_pref/en/’ I’m not a developer and I’m lost in this matter. Hopefully you can help me. Thanks in advance.

  735. snautz 2007-06-09 / 10.01 pm

    This is my mod of polyglot 2.2
    1. added language info to the permalink, and to the links of mounthly archive
    2. added ability to change language in mounthly archive too
    3. setting text_is_missing_message is working now :)

    You may download it, if you wish at http://snautz.googlepages.com/polyglot-2.2snautz_mod.rar
    :)

  736. Momchil 2007-06-17 / 3.33 pm

    Hi,

    I have installed this plugin on my wodpress 2.2 and the visual editor seems to stop wrapping the text when I start with and then write text between these tags. It is quite a bit annoying. Is there some way to fix this and is this Polyglot`s problem or the way WP handles [xx][/xx] tags?
    And another, maybe stupid question: can I have shown in my posts (like in yours ^^) without using html code for the brackets?

  737. malyfred 2007-06-18 / 9.25 am

    @Momchil
    1) Unfortunately the visual editor issue is WP’s issue. Have you tried having [xx] tags on separate lines?

    2) No, the only idea in my mind how to show [xx] in the post text is to use html entities.

  738. Momchil 2007-06-18 / 1.25 pm

    1) I have tried:

    [xx]
    text here
    [/xx]

    and when I write the text between the tags, it is not being wrapped.

    2) I have tried adding html code (in the code tab) for the closing bracket as in your post above, but when I click to save it, it is transformed into bracket, weird though. Can you incorporate some kind of escaping \[ for instance for [ and \] for ] ?

  739. malyfred 2007-06-19 / 11.08 am

    @Momchil this conversion of html entities is a problem of WP or actually of wysiwyg editor. Turn it off and everything will be ok.

  740. vi-su 2007-06-20 / 8.01 am

    Automatische Online Übersetzung durch Plugins…

    Viele Seiten werden durch automatische Übersetzungsprogramme von einer Sprache in eine andere übertragen. Die Idee, den Leserkreis dadurch zu erweitern, wird durch die Qualität der Übersetzung getrübt und es wird mit Sicherheit…

  741. arry 2007-06-21 / 8.22 am

    You are assured of compatibility with WordPress 2.2 ? After installation I do not see any adjustments :(

  742. malyfred 2007-06-24 / 10.37 am

    @arry What exactly doesn’t work?

  743. jay 2007-06-25 / 1.38 pm

    hey,

    just started using your plugin today and it seems quite awsome but i got a little problem:
    I am using a dropdown plugin and i havent been able to figure out how to also translate the menu titles in there.
    I searched this page but comment #4 wasnt really helpful to me…i’d appreciate further explanation!
    thanks

  744. dr770 2007-06-26 / 12.39 pm

    Great plugin! Is it any way to make it compatible with navigo: http://adahas.com/work/navigo/ ?

  745. dr770 2007-06-26 / 1.15 pm

    I got it, just calling function polyglot_sanitize_title, for “translating” of navigo output.

  746. pako 2007-06-26 / 4.52 pm

    If you add the following lines:

    global $wp_locale;
    $wp_locale->init();

    after the load_default_textdomain(); line, then month names get translated, too.

  747. Martin 2007-06-27 / 10.43 am

    Another thing I find cool about language switching is to have subdomains like this:

    http://en.yoursite.com
    http://es.yoursite.com

    ( Considering we have english & spanish )

    Then it would be just adding an alias in the apache conf:

    ServerAlias en.smartone.es smartone.es

    ( You can check this working on http://www.smartone.es No wordpress just for the example… )

    I will try to implement this with polyglot and write another entry if I can get it to work.

    Then we could implement the function by
    #363 TyskJohan (JUST THE IDEA / DIDN’t tried it actually)

    support for in-URI language selection with subdomains:

    function lang_from_qs ($default=’en’) {

    preg_match(’/(^\S{2})\./’,$_SERVER["HTTP_HOST"],$match);
    if (count($match) ) {
    $_GET['lp_lang_view']=$match[1];
    } else {
    $_GET['lp_lang_view']=$default;
    }

    return;
    }

  748. Guy Bouchard 2007-06-27 / 9.04 pm

    I have some problem with into my post. I think i have done everything alright but it stay in french when everything else is in english. I prefer not modifying post-template.php to correct this but i need my reader to see everything in their language.

    By the way, your plugin is really really helpful!!

    Thanks!

  749. Andre 2007-06-30 / 3.37 pm

    sehr schönes thema danke dafür…

    mfg.andre

  750. Ilya V. Azarov 2007-06-30 / 4.31 pm

    I’ve written some hacks for your plugin to make it work on my domains like en.domain.com, ru.domain.com.

    Well, here are some hacks for correct work on such kind of domains.

    Later I’ll post hack for your plugin, but I think they are too simpe :)

  751. Kim 2007-07-01 / 4.54 pm

    Thanks so much! You’re obviously very busy doing tech support. Your hard and continued work is appreciated.

  752. Anders 2007-07-04 / 10.52 am

    Hi.

    I have the same problem as amanda in comment 596. Is there a solution for this problem?

  753. had 2007-07-08 / 8.51 pm

    it works perfect for me.. 10x..

  754. Pierre 2007-07-12 / 9.39 am

    Hi- Thanks for the pluggin, it’s great.
    There is however something I cannot explain or understand.

    If I use:
    if(function_exists(’polyglot_list_langs’)){
    polyglot_list_langs(false);
    }
    to define the language by default for the blog, it redirects to
    http://www.website.comlang-pref/xx/ instead of
    http://www.website.com/?lang-pref/xx/

    The work around I found was to define ‘hard’ links pointing to …/?lang-pref/xx/

    However there is a problem on some of the pages.
    If you go to my site and choose English as the default language, all the pages show perfectly fine.

    If you choose Espanol or Francais, The font gets much bigger for no obvious reasons only on certain pages.

    For example, if you open the page “A propos de Pierre” (when choosing French as the default language), the text gets incredibly larger but goes back to normal when you go to another page.

    Anybody has any idea why?

    Thanks in advance. Much appreciated.

    Pierre

  755. Raffa 2007-07-12 / 5.27 pm

    Hi! I have some problems in making the date of the posts show in different languages. Everything is set alright, but the language of the_date, the “Posted in” and “1(2…X) comment” are always in English (follow the link on the signature to see my website)

    My best compliments for this plugin. A discussion forum would be however really appreciated (it’d make things easier instead of searching for already-discussed issues with a ctrl-f :)). If help needed, let me know. I’d be happy to host the forum on my web site.

  756. rhwinter 2007-07-13 / 1.21 am

    Hi there!
    I made some changes (small improvements?) to the plugin that I would like to contribute back to you, how can I do that? (contact me via e-mail if you can).

    (BTW, nicely done with this!!!)

  757. Marcelo 2007-07-19 / 8.58 pm

    Hi, I´m having exactly the same problem as Pierre on #208 (2). When I click the language, switches correctly, but when I click on any link (to see a post o change section) it returns to english (wich is my browser language).
    I´ve tested my browser with this blog and works fine, it always shows the lang i´ve chosen.
    Php code is in the header, I´ve tried in other files but no good results. Anyone can help me?
    Thanks!..
    Marcelo

  758. Abu 2007-07-22 / 12.10 pm

    Hi, I tried following the instruction correctly by downloading the .mo laguage file into wp-includes/laguages/ then i activated the pluging polyglot for language translation.
    I also downloaded the default_gettext.zip theme and try them out but it does not translate anything when i click on a flag.

    I read a lot of the comments but they get me more and more confused. Can somebody give simple explanation of all the files that I need, how and where to put them up to make it work.
    I feel like i’m missing some information, but what is it?
    Thanks

  759. Boriel 2007-07-22 / 1.12 pm

    A little suggestion:

    The function polyglot_uri_cleaner should have this:
    $the = wp_specialchars($txt);
    before the return.

    This filter other special chars in the url, and prevent some XSS injection vulnerability (not very probable anyway): try
    http://www.fredfred.net/skriker/index.php/?%20script%20alert%20%22hola%22%20&%20%2Fscript%20=#4301267365246314884

    You should not see an alert pop window coming out of your site.

    An thx! for this plugin! :)

  760. Boriel 2007-07-22 / 1.13 pm

    Note: The above comment has been filtered by Wordpress. Just try
    http://www.fredfred.net/skriker/index.php/?XXXXX
    where XXX is a javascript alert, for example.

  761. rymo 2007-07-23 / 2.00 am

    Hi I’m trying to figure out how to make bilingual rss. As I understand www/index.php?feed=rss2&lp_lang_view=pl should give me polish version but neither i give lang view..or not…i always have english version(which is default).
    I tried netvibes and some plugin to firefox.

  762. Pierre 2007-07-23 / 5.02 am

    Marcelo,
    I solved this problem but I don’t really remember how.
    I think i has something to do with the way Wordpress refers to the posts (permalinks). My parmalinks were the default …?## format and i did not work.

    Now, I refer to the posts/pages with the slug name and it works fine.
    I hope it helps.

    For the font size changing, the problem was that the opening tags where after a tag.
    I moved the
    before the tag and everything works fine now.

    Thanks for the great pluggin.

    Marcelo, I hope this helps.

  763. Jib 2007-07-28 / 1.14 pm

    Hello Fred !

    Polyglot is really really great.
    As we use it on our business blog (freshfromthehive.eu) and my personnal one I merged Maira’s default theme with the last version of Kubrick (so you have sidebar…).
    And also made the french translation.

    You can find the files here: http://www.freshfromthehive.eu/2007/07/28/wordpress-polyglot-kubrick-16-francais/

    See you, bye.
    Jean-Baptiste.

  764. Kenji 2007-07-28 / 8.56 pm

    Hi,

    Thanks so much for this great plugin.

    I noticed that the “read more” (when using a command in the post) links are not modified to include the correct lang parameter. Any idea how this could be done ?

    Also I have a hard time getting google to index the translated articles, is it due to the permalink format (example.com/articles/20070723-title.html/lang/en/ should be example.com/articles/20070723-title/lang/en/ or perhaps like this example.com/lang/en/articles/20070723-title.html)
    Is it possible to add a filter to get_permalink to solve all these problems ?

    Thanks.

  765. Kenji 2007-07-28 / 9.02 pm

    Oups : when using a command in the post ===>> when using a ‘more’ command in the post.

  766. malyfred 2007-07-29 / 8.20 pm

    @Kejni: the “more” improvement sounds like a good idea – I’ve added it to ma ToDo list.

    The first issue is a big problem. WP’s url handling mechanism is still a bit quirky and I haven’t much success when playing with it:( so I’m bypassing it in current version of Polyglot. Maybe in the future.

  767. Cyphris 2007-07-30 / 1.29 pm

    Is there a way to use Get-a-Post AND gengo?
    if you get a post with get-a-post then get-a-post can’t recognise the language or the ID of the post.

    Get-a-Post will always take the latest post even if it’s a translation of the primary post.

    Is there a way around this?, how can you make so that get-a-post knows what language the site is currently on AND get the right ID (for the post in every language)?

  768. (v) 2007-07-31 / 7.47 am

    for localization of blogroll categories links in format simply add this modifier function to polyglot.php:
    add_filter(’link_category’,'polyglot_filter’,1);

    works good with wp_list_bookmarks() for example..

  769. (v) 2007-07-31 / 7.48 am

    for localization of blogroll categories links in [ lang_xx ]…[ /lang_xx ] format simply add this modifier function to polyglot.php:
    add_filter(’link_category’,'polyglot_filter’,1);

    works good with wp_list_bookmarks() for example..

  770. scooly 2007-08-02 / 11.14 am

    How can I use Polyglot on custom_fields?

  771. Kim 2007-08-07 / 2.03 am

    Hi I’m looking for help using Polyglot with Event Calendar 3 by Firetree. The posts come up fine, but the side widget doesn’t pass the code to polyglot before output, so all the [lang __] tags and both languages present in the sidebar.
    The widget functions are as follows:
    [code]
    function ec3_widget_list($args)
    {
    extract($args);
    $options = get_option('ec3_widget_list');
    echo $before_widget . $before_title;
    ec3_default_string($options['title'],'Upcoming Events');
    echo ec3_default_string($options['title'],'Upcoming Events');
    echo $after_title;
    ec3_get_events($options['limit']);
    echo $after_widget;
    [/code]
    The function that calls the text is the ec3_get_events function, but since there’s no echo I’m not sure what to do.

    If anyone could offer some help if would be much appreciated. I’ve been trying to solve this for a month but haven’t had any luck yet.

    Cheers-

  772. Joaquin 2007-08-08 / 9.36 am

    Hi!
    I would like to know if I can change the header image for each language. I have a header image with text inside (in picture mode) that needs to be replaced when switching languages.

    BTW, amazing plugin!!

  773. Flippress Blog » Blog Archiv » Backend mit Wordpress 2007-08-09 / 12.28 pm

    [...] 2. Mehrsprachigkeit Da wir gleich von anfang an in Englisch und in Deutsch starten werden, benötigen wir ein mehrsprachiges System. Das Polyglot Plugin scheint nach den Erfahrungen von Christian Strang ideal geeignet zu sein. [...]

  774. Daniel 2007-08-09 / 10.41 pm

    Hi.

    I’ve just started using the plugin and find it amazing! Right now I only have one problem, and that is the widgets using Wordpress 2.2 and K2. Take a look at the two downmost elements in the sidebar. Why does not polyglot understand the language syntax there?

  775. Daniel 2007-08-09 / 11.01 pm

    And the link to the site I’m reffering to: http://nyelapiazza.no/wp/ ;)

  776. malyfred 2007-08-14 / 1.13 pm

    @Joaquin:


    <?php
    switch(polyglot_get_lang()){
    case "en":
    echo "<img .../>";
    break;

    case "de":
    echo "<img .../>";
    break;

    default:
    echo "<img .../>";
    break;
    }
    ?>

  777. NightAngel 2007-08-20 / 5.52 am

    Hello, I installed this powerful plugin but I have one little problem. Indeed when I receive an email indicating to me that new comment was posted, there are [ lang_xx ] etc… An error at the time of my installation maybe ? A solution ? Thank you very much and sorry for my bad english ;)

  778. malyfred 2007-08-27 / 12.19 pm

    @NightAngel This should be fixed easily by adding hooks for e-mail processing.

    Try to add “comment_notification_subject” hook and some other from http://codex.wordpress.org/Plugin_API/Filter_Reference#Administrative_Filters to the polyglot’s list of registered hooks and you’ll see if it helps.

    Let me know what is the right combination of hooks and priorities and I’ll add them to the official release.

  779. deborre 2007-08-27 / 4.28 pm

    Hi, was looking for a multilanguage solution for my wordpress based website and just found your great plugin. It seems to work almost perfect for me except one little thing:

    I wanted my navigation to be multi language as well so I just tried to put language tags in ther as well but it is just showing the different translations next to each other now.

    Hope somebody is able to help me with my little Problem and thank you for this great Plugin again.

  780. deborre 2007-08-27 / 4.31 pm

    sry I forgot the link… the page is http://www.deborre.net/wp in the top left corner you can see the two translation “_impressum” and “_imprint” next to each other.

    Thanks again

  781. Michael 2007-08-29 / 5.57 pm

    Hi guys. I’m really impressed by your plugin. It works perfectly for my German-English blog. I only have one little problem. I recently added social bookmarking “sumit this” buttons to my page.

    Now I want to make something like this for the template file:
    (it should be php code)

    if current language = de then do begin
    [show counter 1]
    end
    else if current language = en then do begin
    [show counter 2]
    end;

    Can anyone tell me which is the right code for the current language check. Plz help me… I really tried to make it work. But I can’t manage to solve the problem…

    Greetings Michael.

  782. Michael 2007-08-29 / 6.04 pm

    Well … I tryed to solve it for up to 2 hours and now 5minutes after I posted this I found the answer…

    Here you go:

  783. Michael 2007-08-29 / 6.06 pm

    digg_url = ‘WEBSITE_URL’;
    digg_bgcolor = ‘#FFD3A6′;

  784. Michael 2007-08-29 / 6.06 pm

    Hm posting source code doesn’t seem to work. I’m sorry.

  785. tholmes 2007-09-02 / 4.01 pm

    Hi!

    Thanks for this great plugin!

    I have one problem: I apply tags to the

    Blogname and the
    Blogdescription

    as well and it works great except for the RSS feed. (The polyglot content itself is correctly rendered.)

    Thanks for any help in advance!

  786. Jack 2007-09-03 / 10.49 pm

    I have the same old problem, as I can see in some other post… The plugin don’t work with rss… I configured all the plugin for 2 languages but I obtain the rss only in one language…
    I use wordpress 2.2.1 and this could be the reason… I will wait some help, thanks…
    (PS: It’s a great plugin, rss problem a part)

  787. ademers 2007-09-06 / 3.35 am

    Hi, thanks for the great plugin. I’m using it on WordPress 2.2.2 with K2 v096 and am having the same issue as Daniel in comment #774. I would like to have text widgets appear in 2 different languages. I looked at #726, but am not well versed in PHP, so am not sure where to put this code. thanks for your help…

  788. ovidiu 2007-09-06 / 2.09 pm

    hello, I was just curious how you would compare your plugin to gengo. I see some comments in this post so you should be aware of it. I am looking for a multilingual plugin solution for wordpress and at a first glance gengo seemed more complicated because I have to change and adapt a lot of the plugins I am currently using… I just need a good comparison between these 2 plugins, maybe a little pro/con list to help people decide what fits their needs better?thx

  789. roberto 2007-09-07 / 9.53 am

    Can i translate the category_descriprtion()? Cause i call this function from the index of my site…butpolyglot translate only the ‘post’ and dosn’t works with _description…….

  790. Andrea 2007-09-07 / 3.02 pm

    Hi Malyfred,

    just to let you know that I have installed your plugin on my blog to make it bilingual (English and Italian). Although I had to play a little bit with it I found it very easy to use.

    Thanks!
    Andrea

    PS: I have quoted Polyglot (with link to this page) in one of my posts.

    Great

  791. EQKE 2007-09-09 / 8.08 pm

    Great plugin. Thank you!

  792. enamour 2007-09-10 / 10.50 pm

    Thanks again for your great plugins.

  793. does 2007-09-19 / 3.03 pm

    Does Polyglot work in the new WP 2.3?

  794. kaiser 2007-09-20 / 4.18 am

    Hi,
    @does: yes, it does.

    @maylfred: but there are still some problems.
    1. on my index-site flags are linking to http://web101.cbel.de/josephhaydn/lang-pref/en(or de) … which doesn´t exist at this point.
    2. can´t figure out how to translate category-names, which i use as title.
    3. could you focus on making a summary of the problems and sollution people are posting (about 10 common and 5 special)
    4. could you make as an result of 3. a to-do list on top of this page for the next release? so developers who might need this plug and bring it further doesn´t have to crawl through all 800 comments and can help easier to finish this plugin?

    5. it rocks, but i can´t make use of it at the current stadium and got no other sollution in sight…. thanks for all, but please spread the further development. as far as i was reading (over one hour) there are several people who want to contribute.

  795. Joachim 2007-09-20 / 7.29 am

    that´s what I am looking for! thanks a lot!!

  796. kaiser 2007-09-23 / 1.00 pm

    HINT: (for everybody who tries the plugin)

    Try to get the ‘tinymce’-wysiwyg editor and define there in the drop down list the lang_de and lang_en as (for e.g) german and english, so users/authors can more easily create different languages in your wp: maxpower [DOT] ca/
    how-to-add-buttons-
    to-the-wordpress-editor-
    for-your-plugin-theme/2006/10/28/

    greetings

  797. Sébastien 2007-09-25 / 2.37 pm

    Hi,
    This huge plugin is really the most compatible multilanguage plugin I saw. Great work !
    But I needed to edit the languages list in a select list. So I made a mod you can download on my website :
    Informatique de France
    I would be proud to help you in this plugin’s programmation.
    See you !

  798. kaiser 2007-10-01 / 3.15 pm

    Hi Sebastien,
    your page is in french….

  799. riiil 2007-10-03 / 12.21 am

    Hi,
    thanks for your great plugin!
    Unfortunately I’ve a problem.
    I use the default permalink style ie. …/blog/?p=2
    Language changing works well everywhere except the main page. That is because in that case there is nothing like ?p=2 just the directory …/blog/ and your plugin adds the /lang-pref/xx/ to the URL so finally it looks like: …/blog/lang-pref/xx/
    and that doesn’t work, because the server wants to find a directory like this.
    How can I fix that?
    Can you tell me how have you done it in your site (I mean how have you put index.php into the url)?
    thanks a lot!

  800. delFuego 2007-10-05 / 10.11 pm

    I wonder if this plugin is compatible with your IImage Gallery plugin?

    Lets say I have both installed: if I used this for an image title…

    Image

    …would the image title change accordingly to the language chosen?

  801. Abu Yervant 2007-10-10 / 5.32 pm

    I had downloaded and installed polyglot2 in my blog. It still in a dev .

    I love it ……., but not without a problem.

    I place polyglot widget on my sidebar, but it keep send me to 404. Something to do with permalink ( I think ).

    I’m a newbie @ this. Tried to work on the code, but ….

    It was a mesh, and I had to refresh my blog with new copy of polyglot. Enlight me please ….

    Thanks

  802. Mark 2007-10-17 / 9.49 am

    Great plugin.

    I used it here:

    http://puppetfestival.dk/

    And it worked like a charm. All content is in english and danish and is switchable. So far so good. Only I didn’t use a localized theme.

    Now I’m working on a new site and this time I’m gonna use a theme, that is using gettext and is in both english and danish. Currently I’m using Mandingo for testing. But I can’t get it to work. My config.php has define(’WPLANG’, ‘da_DK’) and da_DK.mo in wp-content/languages. I tried (’WPLANG’, ‘en’), but it didn’t help.

    There is a da_DK.mo file in the theme directory. There’s no en.mo but the default in the theme is english, so I guess that’s ok. Or should I create an english .mo?

    To the best of my knowledge everything is set up correctly in polyglot.php. But it doesn’t work. The theme strings won’t switch to danish. I’ve got it running here:

    http://mark.gazel.dk/

    Is there a step by step “how to” I can follow? What to put i config.php. What should be be in wp-content languages, what should be in the theme folder etc. When I want my site to be in english and dansih. A file by file approach. I’m sure I’ve set up the plugin correctly. Regarding languages codes etc.

    Is it because I’m using WordPress 2.3 and an update is needed?

  803. Gordie 2007-10-17 / 2.59 pm

    Hello Cyphris, I wrote a function to use “get-a-post” with gengo.
    In facts, its a new function to add to gengo_extra_functions :

    *******
    // Sponsored by Gordie Lachance
    // Outputs the translation of the post ID.
    function gengoGetAPost($monpost) {
    global $post, $gengo, $wpdb;
    $now = current_time(’mysql’);
    $where_posts = “WHERE p.post_date language_preference_id);

    $post = $wpdb->get_row(”SELECT p.* FROM $wpdb->posts AS p INNER JOIN $gengo->post2lang_table AS p2l ON p.ID = p2l.post_id INNER JOIN $gengo->post2lang_table AS p3l ON p3l.post_id=’”.$monpost.”‘ “.$where_posts.” AND p2l.translation_group=p3l.translation_group AND p2l.language_id IN ($language_ids) LIMIT 1″);

    if (!$post) { // if there is no translation, show the original post

    $where_posts .= ” AND p.id=’”.$monpost.”‘”;

    $post = $wpdb->get_row(”SELECT p.* FROM $wpdb->posts AS p “.$where_posts.” LIMIT 1″);

    }
    get_post_custom($post->ID);
    setup_postdata($post);
    }
    **********

  804. malyfred 2007-10-18 / 9.31 am

    @Mark – that’s quite strange because I use the very same configuration on this site and it works smoothly. The latest fully tested version of WP that Polyglot works with is 2.2 but I am not aware of any important changes added to the version 2.3.

  805. Mark 2007-10-18 / 7.41 pm

    Could it be that there isn’t an english .mo-file in the theme folder? Is that essential?

  806. Jay 2007-10-22 / 10.21 pm

    Hi, quick question, I assume the content has to be UTF-8 right?

    There’s no way for the encoding to be different?

    Thanks!

  807. René 2007-10-25 / 1.46 am

    Does someone know if there’s a Plugin that shows links to related posts to the one currently viewed that works with Polyglot? I am using a Related Posts plugin on my blog, but as you can see there, it doesn’t really coop well with polyglot :-(
    Thanks for creating an awesome plugin, sir!

  808. Donia 2007-10-29 / 1.21 pm

    Please, I have wrote a comment some weeks ago but I think it’s still pending for moderation, could you please check?
    Thank you

  809. malyfred 2007-10-30 / 7.57 pm

    @Donia I get about 3000 spam comments a day and only about 50 of them are in the moderation queue which I check manually – the rest of them is deleted automatically. I’m sorry if your post was one of them.

    Post your comment again or send me an e-mail.

  810. Donia 2007-10-31 / 1.02 pm

    Ok I’ll try to remember what I wrote.

    First problem (or maybe it’s just the way it has to work):
    the main language of my site should be italian. So in the wp_config I used to set wplang to it_IT.
    Since I installed polyglot I had to change this to en_US because the main language of wordpress is english and so there is no en.mo file.
    If I set again the language to it_IT the theme won’t get translated in english.

    This is not a big problem except for the fact that the date in the posts shows months in English and not in italian or french (which is the third language I offer to my visitors).
    Same happens in the control panel in Options – General Options – Date and Time.
    All the admin panel is translated in italian (or french) when I set lang_pref/it but date and months…

    Example:
    The output date when I set lang in english shows:
    Output: 31 October 2007

    When I set it to italian it shows:
    Esempio: 31 October 2007

    This should be:
    Esempio: 31 Ottobre 2007

    Second problem:
    is there a way to make the event calendar work with polyglot?
    This plugin has the localization but it doesn’t communicate with polyglot.

    Anyway, this are not major problems and I thank you a lot for writing such a great plugin…I love it!!!

  811. Daniele 2007-11-01 / 2.11 pm

    Hi!
    I’m using this plugin on my blog, but I have a problem: how can I use it to translate categoryes when using the_tags in WP 2.3?

    I have tried something like “echo lang_picker_respect_more( the_tags() );” but it doesn’t work. Same with the tag cloud function.

  812. suika 2007-11-01 / 4.42 pm

    Hey there, superb plugin — thanks very much for all your hard work. I have a small question I’m wondering if you could answer, though. When I specify my RSS feed to Japanese, upon clicking the links featured within the Japanese RSS feed on my blog it defaults back to the English page. Is there any way of making these links to the main site featured within the RSS feed automatically default to the language they’re supposed to be when clicked? Many thanks for any advice.

  813. malyfred 2007-11-01 / 11.37 pm

    @Daniele Tags are not supported yet – the tag hooks are not documented on codex.wordpress.org so I have to play with WP2.3 a bit to find the right hooks.
    I hope I’ll fix it soon.

  814. malyfred 2007-11-01 / 11.43 pm

    @suika Well, it could be done but the idea is that that the user by default gets the language version of certain page in language that best suits language settings in his browser. This works quite well in most cases and one doesn’t have to specify the language version in URL.
    There are quite many rss related hooks in WP so you can enhance the Polyglot in this way.

  815. malyfred 2007-11-02 / 12.04 am

    @Donia Time and Date translations don’t work because PHP lacks a good and reliable support for this. We were discussing this issue here earlier and I have an idea how to fix it – but don’t have enough time to implement it.

    Yes, any plugin can support Polyglot without even knowing anything about Polyglot. In most cases using internal WP filter hooks should be just enough. In some rare cases when it is not enough you can point the author of such a plugin to this page and he can add few lines of PHP code to his plugin to implement the full support of Polyglot.

  816. Manuel 2007-11-03 / 12.55 am

    Hi, thank you for the great plugin, but I have got a little problem!

    I want to have a multilingual sidebar, but I cant work with !

    I am not so familiar with PHP and Wordpress so I dont know how to do it…

    Can you help me please?

  817. Xu - L'instant des... 2007-11-04 / 2.36 am

    Hi,

    thanks for this very helpful plugin.

    To have a better SEO, I’ve modified the menu adding this kind of links :

    <a href=”/lang-pref/en/” rel=”alternate” hreflang=”en”>english</a>

    <a href=”/lang-pref/fr/” rel=”alternate” hreflang=”fr”>français</a>

    Search engines shouldn’t cache duplicate content with this !

  818. malyfred 2007-11-05 / 4.48 pm

    @XU Thank you. It’ll be in the next release. There also could be <link> elements added to the <head>

  819. doz 2007-11-06 / 12.09 am

    $polyglot_settings['use_flags'] is ‘true’ but I don’t see flags! :(

  820. Gavin 2007-11-07 / 6.56 pm

    Hi Malyfred & co.

    Your plugin is fantastic. Its amazing to see that open source stuff is so advanced. I have installed it on a test server here:

    http://gavin.doesntexist.org/LivetoLove/

    Got the translations working in a basic way, and understand about the .mo etc. I’m having a problem with comments – they’re not working. Looks like something to do with permalinks, or maybe the linking itself. I’m using wp 2.3.1 and k2 rc3, but the comment problem is also there in kubrick (gettexted) for me. I assume its a simple configuration problem, but i can’t figure it out!

  821. Gavin 2007-11-07 / 6.58 pm

    Just to carry on with the above, it looks like its inserting the #respond or #comment, but not attaching a page_id for the tag to operate on.

  822. Schlumpf 2007-11-08 / 11.43 am

    Hi Malifred,

    thank you for this plugin.

    But I have a problem with validation:

    After lang_view=en there is expected only one ‘ instead of ”.

    What could be wrong?

    Ferdi

  823. kink 2007-11-09 / 5.48 pm

    Thanks for the plugin. I’ve tried several similar plugins for WordPress but yours is the best one. Thanks for the great work!

  824. Gavin 2007-11-10 / 12.10 pm

    further to my above problem with the URL and commenting, i found if i make the custom permalink /index.php/%post_id% the comment links work first time :) thought i’d post back here incase this is of use to anyone

  825. Manele 2007-11-12 / 3.00 pm

    thank you for this plugin! i like this plugin because is not overloading the server so much like other similar plugins

  826. bart sullivan 2007-11-13 / 11.38 am

    Awesome script. One question before I go ripping apart code.

    Is there a way to change the bloginfo->name field so that it works ok in WP2.3.1? Currently, it works find for the first page – but any subsequent page I try to display – it shows something like this:
    Contest Rules | site name in english

    The same also happens when Wordpress sends an email to users or admins. Always get that full tag.

    Is there anyway around this? Thanks
    Bart

  827. bart sullivan 2007-11-13 / 11.40 am

    oops – looks like tags got removed… what I meant in the above post is that is displays the full syntax for setting a multilingual anything according to the symbols used in polyglot. dont know how to bypass that syntax filter in this comment Im writing.

  828. math 2007-12-01 / 10.47 pm

    Hi, and thanks for your work. great plugin. It use to work, but from I change my permalink to a Pretty permalink, when I click on the french flag, nothing happen and the french translation is not showing up. I don’t wanna translate the template but only the post. If someone has an idea, it ll be helpful, thx

  829. doz 2007-12-08 / 1.52 am

    When I use
    if(function_exists(’polyglot_list_langs’)){
    polyglot_list_langs(true);
    }
    it shows a flag that is not use in any post!
    why?

  830. Martin 2007-12-18 / 10.07 pm

    Hi Malyfred,

    I really like this great plugin! Only this plugin made it possible for me to convert my website to WordPress. I love it!

    I noticed that the plugin does not work together with All in One SEO Pack by uberdose. I asked for a solution there and got a solution. Here it is:

    http://wp.uberdose.com/2007/10/02/translations-for-all-in-one-seo-pack/#comment-20765

    Could you please add this to the next release of your great plugin?

    Oh, another request would be that you maybe add the options to a seperate config file to make upgrades of Polyglot more easy.

    Kindest regards,
    Martin

  831. Martin 2007-12-19 / 12.05 am

    Hi Malyfred,

    hm, I found a problem with Polyglot and WPG2 (Gallery2 integration to WordPress). WPG2 removes the trailing slashes from URLs because of rewriting caused 404 issues. I googled and did not found any solution.

    Is it possible to check if there is a trailing slash and if not add it to lang_view and lang_pref variables? Otherwise these links are broken…

    Kindest regards,
    Martin

  832. Martin 2007-12-19 / 10.02 am

    Hi again,

    it seems that there is a solution for All in One SEO Pack and Polyglot without modifying Polyglot. uberdose did some changes in AIOSP. So stay tuned about that.

    Kindest regards,
    Martin

  833. uberdose 2007-12-19 / 11.52 am

    I have released 1.4.3.8 of All in One SEO Pack which is now compatible with Polyglot. Martin tested it and it worked. No need to modify Polyglot. Let me know if there are any issues with it.

  834. Martin 2007-12-27 / 5.20 am

    Hello Malyfred,
    it’s me again.
    I’m afraid that Polyglot has problems with the Tags function of Wordpress 2.3.1. It shows the tags on the live page instead of only showing the proper language.
    Just a problem here? Or did I overread a solution?
    Thanks,
    Martin

  835. Denorm 2007-12-27 / 4.29 pm

    if you want to use multilingual categories but cannot because the category name field is only 50 characters, login to mysql and try:

    alter table wp_terms modify name varchar(200) not null;

    this will set the category name to 200 characters.. i think you can go up to 255 characters for a varchar field.

  836. Dexter 2007-12-28 / 2.40 pm

    Hey, I had some problems making Polyglot sidebar fit the theme I’m using. Fixed it and wrote a little tutorial

    http://www.a2p.it/wordpress/?p=9

  837. Seguelac 2008-01-04 / 5.20 pm

    First of thanks a lot for this plugin. Is it possible to use the plugin to translate meta tags such as meta titles, meta keyword and meta description. Or what is there another way to optimize seo in several languages ?
    thanks a lot

  838. Rodrigo Portela 2008-01-06 / 3.17 pm

    Thank you for this great plugin I’m already using in a bilingual website and I want to use it in some other multilingual pages, at least on the personal website I’m now preparing.

    Sorry if this has been already explained (just tell me where), but… is it possible to show a different sidebar depending on the language selected with the plugin? I don’t know php well enough, but I though some conditional code could do that. I already have several registered sidebars for my one-sidebar theme, to use each of them according to the user’s language, but the sidebar just doesn’t change whatever I try on the code. I also tried using different themes (only with a different sidebar), but the theme switcher doesn’t seem to work on my WP version anymore, if I’m not doing anything wrong. I hope I can make it possible by using a single theme with a changing sidebar according to some variable on the plugin or something like that. I’ll really need to have different content depending on the selected language. Any help would be welcome…

  839. Sam 2008-01-07 / 9.42 pm

    Hi,

    Thanks for this plugins, it’s awesome !
    I can see on your site that your sidebar is translated. How to translate the sidebar to translate the word links or others ? Thanks for your reply.

    Sam

  840. jim 2008-01-09 / 5.14 pm

    Thanks a lot.

  841. Cedric 2008-01-11 / 12.52 pm

    Hi everyone,

    Thanks for this plugin. I can’t work out the sitemap and the permalinks with polyglot. I read the comments above but I still don’t know how to do ! Do anyone have an idea ?

  842. ademers 2008-01-11 / 8.08 pm

    Hi, I’m still looking for help re #787. How do I make text widgets in sidebar appear in multiple languages?
    Thanks…

  843. Cedric 2008-01-16 / 11.09 am

    Any answers to post #841 ? even for payed support ?

  844. malyfred 2008-01-27 / 1.16 pm

    @ALL New version of Polyglot has been just released. Should be fully compatible with Wordpress 2.3. Some other issues have been fixed as well.

    @Rodrigo Portela

    switch(polyglot_get_lang())
    case 'en':
    //english content
    break;
    case 'es':
    //spanish content
    break;
    }

    @Cedric Send me an e-mail with detailed description of your problem.

  845. g 2008-01-29 / 7.34 am

    Hi, great plugin!
    Got one question: How to show BOTH flags AND text :( It works, and it’s great, but I’d like to show BOTH.

    Also, how can I show them in one line? Because right now it’s shown in two lines.

    Thanks!

  846. g 2008-02-04 / 10.56 am

    #794, did you solve the problem? I’m having the same one, flags (or text) link to http://domain/lang-pref/en
    which doesn’t exist.

  847. Davide 2008-02-07 / 12.29 pm

    #795 I hava a problem with post tags: if I write as tags

    Apple, backup, Time Machine

    when I save wordpress show me in the tag box

    Apple, backup, Time Machine, Time MachineApple

    Why?

  848. malyfred 2008-02-08 / 4.32 pm

    @Davide that’s a Wordpress’ feature. Polyglot has nothing to do with it

  849. Davide 2008-02-09 / 6.47 pm

    malyfred….but in this way I can write tag. if I insert post tag inside the polyglot lang tags, wordpress change the order and I can’t add tags for differete lang.
    Why?
    I have to insert a filter?
    Thanks & bye

  850. Matias, 2008-02-10 / 12.27 am

    Hello my name is Matias Casanova And i wanted to now if anyone new if it reduced the SEO exposition in any way.

  851. Matias, 2008-02-13 / 4.52 am

    Thanks for the plug- in it seems to be working fine.

  852. gio 2008-02-15 / 12.57 pm

    plugin don’t do paragraph!!! how to make it work correctly?

    thanks

  853. Dan 2008-02-16 / 1.41 am

    I don’t seem to be able to make polyglot 2.4 work for me. I use a WP 2.3.2 theme but need some assistance to implement it.

    Thanks for any input!
    Dan

  854. malyfred 2008-02-16 / 3.20 pm

    @Davide you have to add the the tags in this way:

    [lang_en]english_tag_name[/lang_en][lang_de]german_tag_name[/lang_de]

  855. test 2008-02-19 / 5.57 pm

    test en

  856. blogged 2008-02-20 / 1.40 pm

    “Polyglot” is not compatible with the plugin “Feedwordpress” :(

    When the plugin “Feedworpress” is active, any post previously added by “Feedwordpress” can’t be switched to another language (all languages are displayed at the same time).

    But if you deactive “Feedworpress”, the posts previously added by this plugin can be switched to different languages…

    Tested on a fresh WP install with this both plugins only.

  857. Krold 2008-02-23 / 1.00 am

    Hi, great plugin.
    I’m running it in tests because I’m afraid I don’t have the time to keep writing my posts in more than one language and I’m wondering if someday I give up from polyglot I won’t have too much trouble to clean-up my posts of all these [langXX] in titles, content, categories and so on. Is there any fast and simple way to return to a clean one language blog if I give up making it multi language? Thanks

  858. deletia 2008-02-27 / 10.36 pm

    Malyfred, thankyou for your work!
    I have installed your plugin (good!!!).
    The only one problem it’s the same of #794 and #846: flags (or text) link to http://domain/lang-pref/en which doesn’t exist, but exist with directions like this http://domain/?page_id=11/lang-pref/en/

    thank you for your help

  859. malyfred 2008-03-02 / 11.24 pm

    @deletia
    just set:
    $polyglot_settings['lang_rewrite'] = false;

  860. Chris 2008-03-14 / 11.26 am

    The translation itself seems to work without issues but deeplinks to that page from elsewhere in the site show the language tags.

    http://www.asiplc.com/category/news

    Any idea why?

    If tried using both square and angle brackets. Help!

  861. 網站設計 2008-03-15 / 10.01 am

    感謝分享!!

  862. nlx 2008-03-18 / 4.37 pm

    If my site contains a menu using GIF and JS, can do something for me ? Can i fix the menu problem with some other technics and use the plugin for the rest of the site ?

  863. Martin 2008-03-19 / 2.04 am

    Hello all,

    I got a W3C bug in Polyglot: It prints out two ‘ in a href links. To fix do this:

    Polyglot 2.3:
    Line 707: $other_Langs .= “>{$foo}$afters”;
    (Delete the ‘ between ” and >)

    Polyglot 2.4:
    Line 702:
    $other_langs .= ” rel=\”alternate\” hreflang=\”{$lang}\”>{$foo}$afters”;
    (Delete the ‘ between ” and rel)

    Malyfred, maybe you can put this into the next release or maybe into the current release.

    Kindest regards,
    Martin

  864. Markus 2008-03-19 / 1.29 pm

    Hello,

    great plugin, as many other people have pointed out. Here’s my question – and I didn’t see it answered yet.

    The widget titles in WP seem to work in one language only. I have tried what I can (which isn’t much admittedly), but is there a way to adjust the titles of the widgets in a particular language?

    Thank you very much,

    Markus

  865. Zirona :: OpenSource Consulting 2008-03-19 / 2.27 pm

    Polyglot editor integration in 5 minutes…

    Polyglot is a great WordPress plugin by Martin Chlupac, which allows WordPress users to offer multilanguage versions of virtually any content. (I’m using it on this website, too.)
    Unfortunately, Polyglot lacks a quite important feature: A proper …

  866. Martin 2008-03-25 / 4.02 pm

    Hi Malyfred,

    I got a new gettext Default theme online at http://www.sebald.com/computer-internet/wordpress/default-theme-gettext-edition

    Maybe you like to add this to the top of your Polyglot page.

    Kindest regards,
    Martin

  867. Andrés Milleiro 2008-03-28 / 7.11 pm

    Hi,

    I think i have a big problem, i have installed an old version of polyglot, where I had to put instead of and now i can’t recognise my posts, one written in gl and others in es. ¿Where I can download an old version of Polyglot?

  868. g 2008-03-29 / 11.13 am

    Martin (#863) thanks for that fix to the code.
    I’ll check if it solves the problem of #846, #858 and #794.

    bye

  869. g 2008-03-29 / 11.17 am

    Continuing my last post, it also seems to be the problem of #598 and 601, just in case someone reads this.

  870. Valwit 2008-03-30 / 6.06 pm

    doing what is described #863 completley wracked up my page. leaving ‘ as it is makes everything work fine, W3C is also happy

  871. Valwit 2008-03-30 / 7.13 pm

    Meantime I upgraded to 2.5, Polyglot seems to have a problem with tags. Since 2.5 coused me also other problems I rolled back to 2.3.3, so as for now I’d recomend NOT to update to 2.5

  872. random 2008-04-01 / 10.10 am

    Is there any easy way to add an options:

    1. change tags to just [xx][/xx] ?

    2. select post language by just applying /xx to the end of url?
    (it actually works on my site)

    I have done these changes on earlier versions, but with every new one it takes some time to remember all modifications to plugin code :(

    Could this be a feature? e.g. replace lang_ with some kind of variable?

  873. Iliyan Darganov 2008-04-01 / 1.50 pm

    I can confirm too that Polyglot 2.4 does not work correctly with WP 2.5. Hope soon there will be an update.

  874. wiredatom 2008-04-01 / 8.28 pm

    There’s a problem in WP2.5 with Polyglot 2.4 trying trying to iterate through tags in posts. If there’s no tag associated with a post, Polyglot will throw an error. So I implemented a simple fix at around line 1002’s [code]foreach[/code] statement:

    Change from this:
    foreach($tags as $tag) {
    $tag->name = polyglot_filter($tag->name);
    }

    to this:
    if(!empty($tags)) {
    foreach($tags as $tag) {
    $tag->name = polyglot_filter($tag->name);
    }
    }

    I hope this helps…

  875. malyfred 2008-04-01 / 10.18 pm

    @wiredatom – thank you. I’ve added this fix into the version 2.5.

    @Andrés Milleiro – Polyglot is/should be fully backward compatible… can you provide me with some more details?

  876. Chris 2008-04-02 / 9.27 pm

    Isn’t there a widget for polyglot?
    I use WP 2.5 and the navigation is made by widgets.

  877. BuKToP 2008-04-04 / 2.03 pm

    How can I make it to translate the links in my blogroll also? I am using WP 2.5 and trying to add .
    But nothing happens. The links are showed with the on the index page :(

  878. Charlie 2008-04-06 / 10.50 pm

    Hi! Polyglot is a great plugin, and it never put me in trouble until I tried to translate strange things. I have this code, which purpose is to show a list of categories with each one’s description below:

    cat_ID) . ‘” title=”‘ . sprintf(__(”View all posts in %s”), $cat->cat_name) . ‘” ‘ . $rel . ‘>’ . $cat->cat_name.’‘;
    ?>
    category_description; ?>

    Well, WP prints the cat list, but this doesn’t pass Polyglot’s filter. As this is not a standard function, I can’t figure out how to make it pass Polyglot’s filter. What can I do? Thanks in advance.

  879. Charlie 2008-04-06 / 10.53 pm

    Oops— sorry for the lack of formatting. Here it goes again:


    <?php
    $categories = get_categories("title_li=&orderby=id&hide_empty=1");
    foreach ((array) $categories as $cat) {
    $cat_link = '<h2><a href="' . get_category_link($cat->cat_ID) . '" title="' . sprintf(__("View all posts in %s"), $cat->cat_name) . '" ' . $rel . '>' . $cat->cat_name.'</a></h2>';
    ?>
    <p><?php echo $cat_link . ' ' . $cat->category_description; ?></p>
    <?php
    }
    ?>
    </div>

  880. Petr 2008-04-09 / 11.11 am

    Zdravim z Hong Kongu,

    Actually, I am now using qTranslate, who’s author claims he was inspired by you.

    So I think there must be some similarities in his and your plugin.

    I got the qTranslate work pretty damn good (in a site with 2 languages, English and Chinese), except for 2 major issues:

    1.) The Google site maps are not being generated for the Chinese language (because it’s not the default).

    2.) I am using a really nice search plugin called Search Unleashed, and again, only the English half of my site is being indexed by this search plugin.

    I suspect that the issue is related to how the language(s) are chosen.

    For example, the author of another plugin called xLanguage suggests a smart method of choosing a default language for search engines ….. Read the details on his site under SEO http://hellosam.net/project/xlanguage/3

    So, I was wondering if your plugin is better in this respect ….. or give you some ideas.

    Diky za pozornost.

  881. Oliv 2008-04-09 / 7.53 pm

    Hello,

    I was using google xml site map: http://www.arnebrachhold.de/projects/wordpress-plugins/google-xml-sitemaps-generator/

    And I found a quick and dirty hack to generate a sitemap.xml file that contained both languages of my site.
    so when you download the previous plugin in sitemap.php you should add on line 2176 by duplication 2175 so it looks like this:
    $permalink_with_fr=$permalink.”lang_view=fr”;
    and add the line 2217 by dupicating 2216 while modifying this:
    $this->AddUrl($permalink_with_fr,$this->GetTimestampFromMysql((…

    @+Oliv

  882. Damian 2008-04-10 / 6.40 am

    is there a way to get the “lang_xx”-tags working in the Custom Fields?
    This question was made in the comment 425 but I didn’t find the answer…

  883. Davide 2008-04-19 / 12.59 pm

    Does this plugin works with php-markdown? For some reason the flags don’t show up when they’re supposed to. I use this plugin in another blog, no problem, but doen’t wok with the on I am presently building…

  884. Davide 2008-04-19 / 1.22 pm

    Forget the previous question, mea culpa, I was just editing the wrong file. By the way, I am integrating the plugin functions in my custom bilingual template; basically, I make use of pages custom fields to get a two-lined menu; in order to parse the custom fields I used the p__() function. Is this the best way to inegrate the plugin function in my template? Or would you suggest using another function/way? Cheers, Davide

  885. Damian 2008-04-21 / 11.10 pm

    I have added p__e where I use the custom field to show the correct language…

  886. Costas 2008-04-22 / 12.21 am

    i am using polyglot in my website. in previous wp versions (2.3) it was working perfect. I am using 2.5 and the latest version of polyglot in my website but i cant see the flags.

    Regards,
    Costas

  887. ¿Por qué bloguear en tres idiomas? | Un Argentino en Eslovenia 2008-04-27 / 10.04 pm

    [...] No quiero olvidarme entonces de dar las gracias a un increíble plugin para Wordpress llamado Polyglot, que recomiendo fervorosamente a todos los blogueros [...]

  888. 2008-04-28 / 9.49 am

    , , , . , , . , .

  889. iBlogic » Blog Archive » Cómo introducir entradas y comentarios en varios idiomas 2008-04-30 / 9.42 am

    [...] blog utiliza la extensión Polyglot para poder meter entradas multilingües (actualmente español e inglés) y así permitir que [...]

  890. Freiheitsfreund 2008-05-03 / 3.43 pm

    Hi together, first many thanks for the great plugin that I am successfully using for 1 year now!
    Second a little question:
    I would like to offer 2 RSS feeds.

    1. if German version exists then German version if no German version exists then feed the English version
    (what happens now is the placeholder is fed that I wrote to show on the page if there is no matching entry in German!)

    2. a feed that shows only English posts and really no entry is shown if a post does not exist in English.

    I am sure this is possible by configuring some filters? But I would be really happy if someone yould help me to figure it out. I could not find out how yet…

  891. A Mind @ Play 2008-05-06 / 5.06 pm

    [...] between multilingual plugins as the features and support changed, from Language Picker, through Polyglot, to Language Switcher or WP_Multilingual. Such a migration might involve moving media around, [...]

  892. nlx 2008-05-07 / 8.07 pm

    i’ve choosed not to use the flags icon (’false’) but Safari tries to use it anyway (and can’t display it because of autorisation problems it seems…). Is it a bug with Webkit/Safari ?

    I’ve found other ppl with similar problems on the web…

    WP 2.3.3

  893. Roderik 2008-05-09 / 5.22 am

    Any suggestions on how to get the /lang/xx/ to work. I tried to do a mod_rewrite however it didn’t help.

  894. Polyglot search fix — e-magine [archives] 2008-05-13 / 3.28 pm

    [...] implementing the Polyglot plugin on a WordPress site I was working on, I found a bug related to the search form: the plugin appends [...]

  895. Vladiuz 2008-05-15 / 8.24 am

    Hi

    I have a quick fix for rss feeds to be displayed in the correct language:

    add_filter('feed_link', 'polyglot_feed_link', 5, 2);

    # and then, after the init funtioncion:
    function polyglot_feed_link($url, $type) {
    global $polyglot_settings;
    $url .= "?lang-pref=". $polyglot_settings['lang_pref'];
    return $url;
    }

    This will modify rss feed links according to preferred language, so you don’t have to make links in a few languages. Will also give you correct feed links in the section.

  896. La Mansion » Blog Archive » Plugins Wordpress 2008-05-16 / 9.38 pm

    [...] Polyglot: Versión mejorada de Language Picker que corrige algunos errores y añade la opción de autodetectar el lenguaje del usuario. Permite mostrar distintos textos dependiendo del lenguaje del usuario. [...]

  897. Agent Orange 2008-05-28 / 10.29 pm

    I’m using this wonderful plugin, and I would like to thank you for developping it ^^

    Anyway, I have a little mini problem.
    When somebody post a comment in his own language, with the tags is defined, it leaves me a blank comment.

    I don’t know why, because it works with the posts (It leaves a message like “Sorry, this post isn’t available in english”), but it doesn’t work for comments.

    I didn’t find any answer and the comments, but I could have missed it.
    Any idea?

  898. Agent Orange 2008-05-28 / 11.09 pm

    Eh, I didn’t express me very well :P

    What I mean is that if someone post a comment in french, with the correct tags, but no version in english, someone who doesn’t use a french browser will find a blank comment.

    What I’d like is that it leaves me a message like “Sorry this comments isn’t available in your language” or something.

  899. Mark 2008-05-29 / 11.54 am

    I got a problem here on the frontpage. Try making a mouseover on the flag:

    http://www.puppetfestival.dk/

    The link is:

    http://www.puppetfestival.dklang/en/

    A slash is missing. Don’t know why. It works on the other pages. Could it be because I use a static frontpage?

  900. Donia 2008-06-02 / 10.54 am

    Hi, Thank you again for the faboulous plugin. I just wanted to tell you that the new version of polyglot in wp 2.5.1 logges me out each time I change the language.
    I had to install the previous version.

  901. nlx 2008-06-03 / 5.24 pm

    Please it would be highly apreciated that the plugin would be fully tested with Safari.

    (My problem is when you choose not to use flag icons the plugin don’t work properly.)

    Thanks for the work while that :)

  902. Qtranslate, il plugin definitivo per localizzare wordpress | Leonardo Musumeci 2008-06-05 / 7.00 pm

    [...] ho provati alcuni: Babel, Polyglot, Jlanguage ma in alcuni casi c’erano problemi di layout, in altri invece venivano localizzati [...]

  903. Garçon aka Martin Kopta » Blog Archive » links for 2008-06-07 2008-06-08 / 1.33 am

    [...] Polyglot | skriker This post is here to introduce the plugin called “Polyglot” – plugin for complete and easy localization of your blog into several languages. (tags: wp plugins languages) [...]

  904. csaba 2008-06-11 / 3.17 pm

    Hi malyfred,

    Im trouble in Polyglot.
    +It can use the translations well
    -but the flags dont display
    ….
    I have set these below
    $polyglot_settings['use_flags'] = true;

    I have a suspicion due to this below
    (polyglot_list_langs is not known)
    … sidebar.php … just ++ shows !!
    ++

    ……………..
    Do you have any idea ?
    Thanks in advance
    Csaba

    PS:WP 2.1 / Polyglot 2.5

  905. csaba 2008-06-11 / 3.20 pm

    …. sidebar.php … just ++ shows !!
    ++ if(function_exists(’polyglot_list_langs’)){
    echo “+++”;
    polyglot_list_langs(true);
    }
    ………..
    the code example was vanished from previous post

  906. Expo Zaragoza: la Generalitat reconoce que el valenciano es catalán… incluso en su propia web en Siempre Juntos | blog 2008-06-13 / 7.48 pm

    [...] Como podréis apreciar en las fotos más abajo, si no sabes utilizar un plugin de Worpdress (que yo lo he usado y es jodidamente complicado) y te metes a hacer una página multilingüe para [...]

  907. Speak for me in English | Speak For Me 2008-06-17 / 9.57 pm

    [...] komen kon fé pr… ouvrir un compte sous Jabber ?Je suis en train de tester un plugin, Polyglot 2.0 permettant d’écrire des billets en plusieurs langues. Après deux bonnes heures à [...]

  908. Martin 2008-06-23 / 9.26 pm

    I just upgraded to version 2.5. I still have the problem that I get emails subjects like this when somebody comments my multilanguage pages (and I’m sure also multilanguage posts):

    [Sebald.com] Kommentar: “Sea water aquarium”

    What can I do about that? It really looks ugly. ;-)

    Regards,
    Martin

  909. Martin 2008-06-23 / 9.28 pm

    Ah great your blog strips the Polyglot code. ;-)

    It looks like this (without the spaces):

    [Sebald.com] Kommentar: “[ lang_de ]Meerwasseraquarium[ /lang_de ][ lang_en ]Sea water aquarium[ /lang_en ]“

  910. François-Xavier Bodin, Chef de projet Web - AMOa 2008-06-27 / 12.27 am

    [...] Oui, comme j’ai fait sur http://www.bewineconnected.com/ avec Polyglot : http://fredfred.net/skriker/index.php/polyglot/ [...]

  911. Impressioni di un tecnico» Archivi Blog » Nuovi Plugins per un blog tecnico 2008-07-01 / 10.13 pm

    [...] Polyglot per l’internazionalizzazione Italiano/inglese [...]

  912. AKERSHOEK.COM » Dutch 2008-07-05 / 9.42 pm

    [...] If you want more information about the plugin I used please have a look on this page: http://fredfred.net/skriker/index.php/polyglot [...]

  913. Impressioni di un tecnico» Archivi Blog » Two step further, a half step back 2008-07-08 / 9.49 pm

    [...] dovuto disinstallare il plugin WP-latex perché non riesco ancora a configurarlo correttamente: polyglot rimane ancora da configurare ma questo non mi preoccupa, perché la sua configurazione richiede [...]

  914. Miklas 2008-07-14 / 10.20 am

    Truly a great plugin, which I am very pleased with. I have a tiny problem though. When used with the Last Viewed Post Plugin http://blog.zeitgrund.de/2007/12/08/plugin-last-viewed-posts-english/ the tags show up in the title.

    Any workaround or am I doing something wrong? It works beautifully apart from the little clash.

    Regards Miklas.

    P.S. I’ve also email zeitgrund about it.

  915. Miklas 2008-07-14 / 10.26 am

    by tags I mean the lang_xx tags inside the []

    Miklas.

  916. Multilingual vs Translator Plugins for Wordpress 2008-07-22 / 2.47 pm

    [...] PolyGlot Plugin Links :: Official [...]

  917. Raffa 2008-07-29 / 2.43 pm

    Wrong timestamp in comments feed.

    I have noticed this problem on my website, and apparently it is also on this one. The date of the comments is right in the webpage, but if you go to look into the rss feed of the comments (also here: http://fredfred.net/skriker/index.php/polyglot/feed/ ), the time stamp is mismatched (e.g. showing 30 Nov 2009). I guess this has to have something to do with the polyglot plugin.

    Thanks for any help.

  918. Impressioni di un tecnico» Archivi Blog » Bilingual!! 2008-08-01 / 12.08 am

    [...] a implementare il bilinguismo, anche se in una forma un po’ rozza: non ho usato il plugin polyglot ma un altro plugin, il Global Translator. Si tratta di un plugin che esegue una traduzione [...]

  919. Un traducteur humain pour votre blog : Le Journal du Blog 2008-08-04 / 1.57 pm

    [...] Polyglot 2.0 [...]

  920. Carsten 2008-08-08 / 4.15 pm

    Nice software, but I noticed that the new included Wordpress gallery function is not 100% supported by polyglot.
    Here you can see the problem: http://www.halle-fotos.de/paulusviertel/drei-auf-eine-streich/lang/en/
    everything works well but the caption becomes not translated.

  921. 282 plugins para WordPress (4ª parte de la L a la Q) | Pichicola.com 2008-08-18 / 1.34 am

    [...] Polyglot: Versión mejorada de Language Picker que corrige algunos errores y añade la opción de autodetectar el lenguaje del usuario. Permite mostrar distintos textos dependiendo del lenguaje del usuario. [...]

  922. Wordpress Multilingual | Blog von Michael Karl, Webdeveloper 2008-08-18 / 5.48 am

    [...] ein Wordpress Plugin aufmerksam gemacht. Der Name ist qTranslate. Im Gegensatz zu Plugins, wie z.B. Polyglot oder dem bekannten Language Switcher unterstützt qTranslate alle wichtigen [...]

  923. André 2008-08-29 / 3.00 am

    First of all, thanks for this amazing plugin!

    I’ve been having one little problem (don’t know if I’m the only one): Whenever I upgrade Wordpress (and do the auto-upgrade of the database) I lose my “multi-language” titles. The posts stay on both languages, but in the titles the tags are deleted and I end up having to retype all the titles in the second language again.

    Am I doing something wrong?

    Polyglot 2.5, WP 2.6.1

    Thanks

  924. Cooperation IWS: Intranet Nomad Web Server » Blog Archive » How to internationalize your sitemap.xml 2008-08-31 / 7.29 pm

    [...] is a trick to use the following plugins, Google (XML) Sitemaps Generator for WordPress and Polyglot, respectively a wordpress plugin to generate sitemap.xml file for indexation by search engines and [...]

  925. MatoSimi 2008-09-05 / 3.19 pm

    Hi, I’m using FireStats plugin on my blog and it contains widget in sidebar which displays popular posts. Titles of this list are not processed by polyglot so it displays lang tags. Can you help me how to fix it?

  926. Vlady 2008-09-11 / 8.43 am

    hi, nice plugin, i’ts very usefull for multilanguage site.

  927. Starkilla » Blog Archive » Mehrsprachig 2008-09-13 / 2.03 am

    [...] durch eine kleine Flagge an dem Beitrag angezeigt. Möglich wird das alles durch das Plug in Polyglot. Ich hoffe die Sachen werden auch in LiveJournal vernünftig [...]

  928. nataliadevalle.com.ar » ocho 2008-09-13 / 9.45 pm

    [...] el plugin Polyglot para hacer el sitio [...]

  929. Roy 2008-09-14 / 9.22 pm

    I’ve been using polyglot for a while, and simply like it. However I have some problems with the delight theme for WP2.6. Unfortunately the Polyglot plugin mixes up the theme in the language that is not set by default. Any solutions?

  930. L10n: localisation of WordPress | James Little 2008-09-15 / 3.04 pm

    [...] also wanted something for the actual content. Polyglot2 can be used to work out the users preferential locale and if that is available, display content in [...]

  931. 生日礼物 2008-09-18 / 7.47 am

    so cool.. i will make a muit-luangage website.. copy that..

  932. kingofpunk 2008-09-19 / 3.00 am

    Hi
    Polyglot2 doesn’t play well with wp 2.6.2 post using
    Anyone with that problem ?

  933. kirjoittaessani » Blog Archive » Mehrzüngig 2008-09-21 / 2.32 pm

    [...] am just trying out the Polyglot2 plugin by Malyfred. 2.31 [...]

  934. WordPress is monoglot 2008-10-02 / 3.13 am

    [...] Polyglot, xLanguage, qTranslate: todo o conteúdo na tabela posts utilizando marcações; [...]

  935. Yoschis Blog » Mehrsprachiges Blog mit Polyglot 2008-10-03 / 4.10 pm

    [...] Jojo bin ich auf Polyglot aufmerksam [...]

  936. Six Ways to Get More Links: Tips for a Niche Blog. : Big Bucks Blogger 2008-10-04 / 4.14 pm

    [...] Polyglot is a Wordpress plugin can help you provide content in a variety of languages, but you need to supply the content in both languages. Unfortunately, writing copy in both English and Swedish is work. Try robo-translation using Word Translation Plugin; it’s free. If free doesn’t work, you can pay for Angsumans’ Översättare Plugg Pro 4.0 Befriaren also known as “Angsuman’s Translator Plugin Pro 4.0 Released”. [...]

  937. StuFF mc 2008-10-13 / 12.06 pm

    fred: Regarding my comment #474, is it now implemented? How can I? Also, I need a way to hide comments in french to my german visitors. Somehow visitors would need to “say” in which language they usually write comments (since pretty much nobody writes a comment in multiple languages).

  938. Yoschis Blog » Gengo ein besserer Mehrsprachigesblogplugin als Polyglot 2008-10-22 / 3.33 pm

    [...] seit einiger Zeit habe ich ein mehrsprachiges Blog mit Polyglot [...]

  939. queleimporta.com » Blog Archive » Multilanguage WordPress plug-ins 2008-10-25 / 11.06 pm

    [...] http://www.fredfred.net/skriker/index.php/polyglot [...]

  940. Plugin multi-idioma en WordPress | El Blog de Alex Borrás 2008-10-26 / 1.39 am

    [...] Polyglot, permite definir varios idiomas, En las las entradas y páginas se escriben los mismos textos encerrados en unos Tags especiales de cada idioma. Tutroial en el Blog de Andrés Milleir [...]

  941. Мои плагины для Wordpress 2008-10-30 / 4.47 pm

    [...] Еще один недавно установленный плагин — Polyglot. С его помощью можно вести блог сразу [...]

  942. Más plugin para Wordpress « El Cubanito Web 2008-11-01 / 2.20 pm

    [...] Polyglot: Versión mejorada de Language Picker que corrige algunos errores y añade la opción de autodetectar el lenguaje del usuario. Permite mostrar distintos textos dependiendo del lenguaje del usuario. [...]

  943. Doctor 2008-11-02 / 1.43 am

    Best of the best

  944. stef 2008-11-30 / 12.38 am

    great….thanks

  945. стАрик 2008-12-03 / 1.12 pm

    А вы не пробывали зарабатывать в интернете?

  946. Frances 2009-01-09 / 6.06 pm

    Hi,

    I’m using Wordpress MU and although my posts are translating fine some of my Widget titles are not translating in the sidebar. You can see the tags.

    I have uploaded the following .mo files to 2 areas: wp_includes/languages & wp_content/languages.
    - en.mo
    - fr.mo
    - en_US.mo
    - fr_FR.mo
    With no luck of seeing any change.
    (en.mo & fr.mo are the same as en_US.mo & fr_FR.mo just renamed) The words are not being translated (see the word “Author” it should be “Auteur” in French).

    I have also ajusted the polyglot.php file to:

    $polyglot_settings['default_lang'] = ‘en’;

    $polyglot_settings['trans']['fr'] = ‘français’;
    $polyglot_settings['trans']['en'] = ‘english’;

    $polyglot_settings['knownlangs'] = array(’en’,'fr’);

    And my wp_config file to:
    define (’WPLANG’, ‘en’);

    I have tried to gettext my index.php code but it did not work.

    Does anyone have any ideas?

    Here is the link to the test blog I’m trying this out on:
    http://web5.uottawa.ca/ssms/blogs/test/lang-pref/en/

  947. DoZ 2009-01-16 / 1.58 am

    NEXTPAGE syntax has one problem: the numers linked to page’s sections link to the default language version even if you are clicking from a secondary language version.

  948. Mark 2009-01-18 / 4.40 pm

    I would like if it was made possible using WordPress’ captions.

    You can translate the caption text but since Wordpress uses the [] brackets i.e.:

    [caption id="attachment_#" align="alignleft" width="*" caption="example"][/caption]

    It messes things up. At least if the image is placed between the lang-start and lang-end tags.

    I’ve tried both [] and brackets.

  949. Criss 2009-02-12 / 11.28 am

    Hi all!

    I am using polyglot extensively in my blogs.

    I am not using lang_rewrite and I discovered that the function polyglot_list_langs in some situations (lang_rewrite inactive) creates bad links that lead search engine spiders to 404 not found errors, thus lowering site’s pagerank, I am afraid.

    For instance, the page at this url
    http://www.fantasy-art-wallpaper.com/?lang_pref=it&paged=9

    produces the “flags” links to
    http://www.fantasy-art-wallpaper.com/&paged=9?lang_pref=en

    You can see that the ? and the & are mis-placed.

    I’m trying to fix this, if anybody has found a solution for it, just post here please or e-mail me at cris.leoni@gmail.com

  950. Criss 2009-04-15 / 2.22 pm

    I fixed this.

    Download the fix (2.5 A version of the plugin) at:

    http://software.cristianoleoni.com/tiki-index.php

    See wordpress section

  951. Thomas Greve 2009-05-11 / 11.02 pm

    What is the difference between Polyglot 2.5 from you and Polyglot 2.5 A from Criss?

    Do you plan to develope future versions of Polyglot?

    Thank you ;-)

  952. indoswiss 2009-05-16 / 4.51 pm

    check out polyglot in action here:

    http://www.indoswiss.co.cc and http://www.indoswiss.cjb.net

    soon going to add custom flags!

  953. ChrisWell » Blog Archive » Into The Dark 2009-05-21 / 4.59 pm

    [...] struggle for a bilingual page (german/english) i was meddling with several plugins, for example PolyGlot, which enables multi-language posts and pages in a wordpress environment. It turned out quite good, [...]

  954. webmaster esmuy.com » Blog Archive » Plugins para Wordpress 2009-05-21 / 5.30 pm

    [...] Polyglot: Versión mejorada de Language Picker que corrige algunos errores y añade la opción de autodetectar el lenguaje del usuario. Permite mostrar distintos textos dependiendo del lenguaje del usuario. [...]

  955. Chauderon 2009-05-26 / 12.13 pm

    Hello,
    Thanks for the plugin :)
    I’m having trouble making it work on the homepage. From any other page the language selection works, but not when you first load the site or go back to the homepage (with Home link). Please see the link. What could be the problem?
    Thanks!

  956. Chauderon 2009-05-26 / 1.09 pm

    LOL, it’s always like that, I’ve struggled with it for hours and now I manage to make it work, after posting my comment ^^
    It was the lang_rewrite option.
    Please delete my comments if it’s possible… :) Thank you

  957. Javier 2009-05-31 / 2.05 am

    Hi,

    is it possible that Polyglot isn’t working properly in the last version of Wordpress (2.7.1)?

    Is anyone else having troubles as I do?

    I see a huge message after every post when Polyglot is activated:

    Project-Id-Version: WordPress 2.7.1 es_ES Report-Msgid-Bugs-To: wp-polyglots@lists.automattic.com POT-Creation-Date: 2009-01-12 00:55+0000 PO-Revision-Date: 2009-03-03 12:57+0100 Last-Translator: Maira Belmonte Language-Team: wordpress-es MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Poedit-SourceCharset: utf-8 X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_c X-Poedit-Basepath: ..\.. X-Poedit-Language: Spanish X-Poedit-Country: SPAIN Plural-Forms: nplurals=2; plural=n !=1; X-Poedit-SearchPath-0:

  958. Post » Haga Dinero Online 2009-06-13 / 10.48 pm

    [...] Polyglot – Malyfred desarrolló este plugin increíblemente bien escrito, sin lo cual no habría podido hacer este blog en idiomas múltiples. [...]

  959. Translation and Multilingual WordPress Plugins « Lorelle on WordPress 2009-06-15 / 10.17 pm

    [...] Polyglot 2.0 helps to make WordPress bilingual. The successor of Language Picker, it support different time and date formats, permalinks, localization of your WordPress blogs, and different languages for posts and Pages. For some tips on using this on WordPress 2.1, see Making WordPress multilingual. [...]

  960. Cristina 2009-07-07 / 4.40 pm

    Hi,

    simply wonderful widget. I tried over 10 different widgets that seemed soooo much sophisticated and wonderful, but they all crashed with wp 2.8. Polyglot was simple and it worked like a charm! Thanks a lot, you make life easier for many people!

    Cristina

  961. WordPress als CMS: Tipps & Tricks #1 - currentpageitem, currentancestorpage, currentparentpage, currentpageitem, wp-configphp, ABSPATH - Data Travelers-Blog 2009-07-08 / 10.59 am

    [...] der in WordPress 2.5 eingeführten Shortcodes und dem Plugin Polyglot kann man recht schnell und einfach seine Einträge und Seiten mehrsprachig [...]

  962. Timothep 2009-07-10 / 2.00 pm

    Hi guys, fantastic work you did here, I’m fan! One thing I did not find yet: how to display a flag to signify the language that is currently set. Is there a way to do that already or it need to be added?
    Thanks, Timothep

  963. PaBLoX 2009-07-12 / 11.15 pm

    Hi! This is exactly what I was looking for! But I’m still having problems with the little flag on each post. Where am I supposed to paste that code?

    And the other thing… How is that you’re supposed to use it on the permalinks? If I write or on the slug it dissappeared.

    Can you give me a hand please?

  964. 5 Lesser Known but Still Powerful Wordpress Plugins 2009-07-20 / 4.05 pm

    [...] 5. Polyglot An intriguing reminder of the early days of altavista and Babelfish, Polyglot can make use of automatic translators to translate your posts into several different languages, and features an option to automatically display them in whatever language a given user’s browser settings indicate that he or she reads. In addition, users can select a language for themselves to view your entire blog in one of several different tongues. [...]

  965. Даниил Семин 2009-07-22 / 5.26 am

    Тема старая конечно , но прочитал с удовольствием :)

  966. Laguna 2009-07-23 / 12.30 am

    Вообще, когда читаешь такое, посещает мысль, а ведь это ж так просто, ну почему я это не смог придумать Респект :)

  967. Bagaimana Membuat Blog dengan Dua Bahasa atau Lebih? 2009-07-23 / 5.16 pm

    [...] Polyglot oleh Martin Chlupac [...]

  968. cinsel ürün 2009-07-24 / 3.16 pm

    Polyglot can make use of automatic translators to translate your posts into several different languages, and features an option to automatically display them in whatever language a given user’s browser settings indicate that he or she reads.

  969. fantezi ürün 2009-07-24 / 3.17 pm

    Forgot to mention a detail about the previous fix : make sure you add the line global $weekday, $weekday_initial, $weekday_abbrev, $month, $month_abbrev; at the beginning of the file, before the variable definitions! Otherwise it won’t work.

  970. Oloroko » Lista de Plugins para Wordpress 2009-07-26 / 12.02 am

    [...] Polyglot: Versión mejorada de Language Picker que corrige algunos errores y añade la opción de autodetectar el lenguaje del usuario. Permite mostrar distintos textos dependiendo del lenguaje del usuario. [...]

  971. Rutja76 2009-07-26 / 6.24 pm

    Just FYI, I’ve realised that “Canonical URL Redirect” of Wordpress (present in the core from 2.3, but the problem started to appear from 2.8) goes into conflict with Polyglot. For instance, it could happen that an URL like

    example.com/post/lang/de

    is redirected by Wordpress to example.com/post/

    causing the post not to change language.

    More info on this bug here: http://wordpress.org/support/topic/237126

    A way to fix it is to disable the Canonical URL Redirect, e.g. by installing this plugin:

    http://picometric.blogspot.com/2009/04/wordpress-disable-canonical-url.html

    Cheers,

  972. Вениамин 2009-07-29 / 4.36 am

    На громких заголовках и подобной шумихе можно делать и не такие успехи :)

  973. Мультиязычные сайты на Wordpress. Выбираем сервис контекстной рекламы 2009-07-31 / 9.12 am

    [...] к примерам реализации на основе Wordpress и плагина Polyglot: 1. Получим код для размещения баннера для выбранных [...]

  974. felix 2009-08-06 / 12.48 am

    Hi malyfred,
    is there a way to translate a string that is created by a widget? Like the “Title” for example which you can set with most widgets.

    Cheers,
    Felix

  975. Martin 2009-08-07 / 9.31 am

    I have the same problem as Raffa (comment 917). The timestamps of the comments feed are broken/wrong. The timestamp of every single comment shows a date and time of yesterday. If I deactivate Polyglot everything is fine. Please help!

  976. ¿Por qué bloguear en tres idiomas? — Un Argentino en Eslovenia 2009-08-08 / 2.40 pm

    [...] No quiero olvidarme entonces de dar las gracias a un increíble plugin para WordPress llamado Polyglot, que recomiendo fervorosamente a todos los blogueros [...]

  977. Language Switcher WordPress Plugin - 聚钱庄资讯网 2009-09-22 / 3.54 pm

    [...] the Language Switcher. It would not work so well without your help! Language Switcher is based on Polyglot, by Martin Chlupac (the flags came from the Polyglot distribution), which was in turn based on [...]

  978. Wordpress als CMS und Multilingual : wordpress::hansi 2009-09-24 / 8.42 pm

    [...] Polyglot von fredfred [...]

  979. Yannick 2009-10-12 / 7.31 am

    974, Felix >
    add the following filter in polyglot.php

    add_filter(’widget_title’, ‘polyglot_filter’,1);

    Otherwise is the development of the plugin stopped?

  980. Sonja 2009-10-15 / 5.05 pm

    great plugin, thank you!

  981. MagicJack 2009-10-23 / 8.34 pm

    I Love your intro with the funny sign in the forest etc. You need a bit of a laugh before you venture into the world of polygot, thanks for that
    MagicJack

  982. Plugins para Wordpress para usar con blespot.com | Scorts Cd Juarez 2009-10-26 / 3.11 am

    [...] Polyglot: Versión mejorada de Language Picker que corrige algunos errores y añade la opción de autodetectar el lenguaje del usuario. Permite mostrar distintos textos dependiendo del lenguaje del usuario. [...]

  983. Елена 2009-10-26 / 6.51 pm

    Предлагаю дополнительный заработок (подработка). Доход до 50 000 руб. в месяц. Обучение и раздаточный материал бесплатно. 8-916-923-21-08 Елена

  984. Oloroko Blog – Lista de Plugins para Wordpress 2009-11-10 / 11.11 pm

    [...] Polyglot: Versión mejorada de Language Picker que corrige algunos errores y añade la opción de autodetectar el lenguaje del usuario. Permite mostrar distintos textos dependiendo del lenguaje del usuario. [...]

  985. Cómo traducir el contenido de tus posts en WordPress | Kaos Klub 2009-11-14 / 3.53 pm

    [...] Polyglot: plugin ya viejo, pero efectivo. Traduce según etiquetas [...]

  986. Boriel 2009-11-15 / 2.32 pm

    A simple tip: to translate the categories in the admin panel just add these line in the polyglot.php file:

    add_filter(’category_name’, ‘polyglot_filter’, 1);

    The best place is to put it after the others filters (e.g. at line #218).

  987. Boriel 2009-11-15 / 2.59 pm

    The above tip (#986) can also be applied to tags with these two lines in the same file:

    add_filter(’wp_tag_cloud’, ‘polyglot_filter’, 1);
    add_filter(’term_name’, ‘polyglot_filter’, 1);

  988. WwW.UrbaNicaNo.Net || Tu Web De Reggaetón & Eventos Urbanos » Plugins para Wordpress 2009-11-30 / 1.06 am

    [...] Polyglot: Versión mejorada de Language Picker que corrige algunos errores y añade la opción de autodetectar el lenguaje del usuario. Permite mostrar distintos textos dependiendo del lenguaje del usuario. [...]

  989. steroids 2009-12-04 / 10.32 am

    ZMsark, did you happen to fix your code so that in Mozilla/Firefox once you enter a quicktag it doesn’t jump to the top? I know that Alex fixed it on his, but just wondering if you had an updated one?

  990. Tutorial para tener un blog en varios idiomas en Wordpress 2009-12-17 / 11.43 am

    [...] Como muchos que leéis el blog lo sabéis, este blog se puede leer tanto en Gallego como en Castellano. Todo esto es posible gracias a un plugin para Wordpress (Wordpress es el CMS, el software que usa este blog) llamado Polyglot. [...]

  991. Светлана 2009-12-17 / 3.40 pm

    Сдаем помещение под устройство автомойки, автосервиса, склада, отдельно стоящее здание в нем кафе и магазин, САО 8-905-756-40-37 Надежда

  992. Flying Ziggy » Blog Archive » Gettext: Images and Flash 2009-12-30 / 5.20 pm

    [...] use CSS to change element background images. This gives added flexibility to wordpress plugins like polyglot and language [...]

  993. Plugins para Wordpress. | Puydi Publicidad 100% efectiva 2010-01-05 / 6.30 am

    [...] Polyglot: Versión mejorada de Language Picker que corrige algunos errores y añade la opción de autodetectar el lenguaje del usuario. Permite mostrar distintos textos dependiendo del lenguaje del usuario. [...]

  994. Janneke 2010-01-08 / 10.47 pm

    Hey, first of all: the plugin is great!
    I have only one problem: my feed. you said you use two different feeds with feedburner, but it doesn’t work…
    Which adress do I have to enter to feedburner?
    I hope you can help me,
    Janneke

  995. empty pages » Updated plugin Google sitemap with Polyglot support 2010-01-11 / 11.52 am

    [...] in order to put in sitemap.xml all localized links to posts, my multilanguge blog based on Polyglot plugin (author Martin [...]

  996. Sergey N Lukin (slookin) 2010-01-11 / 12.02 pm

    I update latest Google sitemap plugin for support Polyglot
    http://look-in.net/polyglot-sitemap-wordpress

  997. Plugins para Wordpress de la A a la Z. | La Fanega 2010-01-13 / 12.05 pm

    [...] Polyglot: Versión mejorada de Language Picker que corrige algunos errores y añade la opción de autodetectar el lenguaje del usuario. Permite mostrar distintos textos dependiendo del lenguaje del usuario. [...]

  998. Global translator, Basic bilingual et autres plugins pour wordpress en plusieurs langues. | Encre de Lune 2010-01-19 / 4.29 am

    [...] en 2005. Et il ne se trouve pas dans les extensions à télécharger sur wordpress.org, mais sur le site de son auteur où on peut voir son [...]

  999. Bloguer en plusieurs langues : 10 éléments à prendre en considération | Geek-Presse.net 2010-01-26 / 11.48 pm

    [...] Polygot 2.0: J’entends beaucoup de bien à propos de ce plugin qui est sûrement le concurrent directe de Wpml. Cependant, il me semble qu’il n’est pas très userfriendly et demande certaines connaissance en PHP alors que Wpml convient mieux au Blogueur lambda. [...]

  1000. 10 elements to consider when blogging in different languages | Geek-Presse.net 2010-02-08 / 10.46 pm

    [...] Polygot 2.0: J’entends beaucoup parler de ce plugin qui est sûrement le concurrent directe de Wpml. Cependant, il me semble qu’il n’est pas très user-friendly et demande certaines connaissance en PHP alors que Wpml peut être utilisé par un Blogueur lambda. [...]

  1001. Cindylooia Soup 2010-02-09 / 10.19 pm

    Polyglot | skriker…

  1002. Multilanguage support in Wordpress | Blafasel bloggt 2010-02-26 / 3.11 pm

    [...] Polyglott plugin In a Rhodes tailor shop… [...]

  1003. Plugins para Wordpress « 2010-03-03 / 1.50 am

    [...] Polyglot: Versión mejorada de Language Picker que corrige algunos errores y añade la opción de autodetectar el lenguaje del usuario. Permite mostrar distintos textos dependiendo del lenguaje del usuario. [...]

  1004. Shinnobi 2010-03-12 / 1.00 pm

    ^^

  1005. Polyglot | kamille l 2010-03-20 / 4.04 pm

    [...] looking for a plugin to make my blog ‘bilingual’. Now I’m testing Polyglot. You can choose your language on right sidebar, i’m trying to put choice from a post [...]

  1006. Илья 2010-03-29 / 9.24 pm

    Сборник книг разного жанра и напрвалений – периодическая литература, газеты, журналы, фантастика, любовные романы, детективы и многое другое

  1007. Ринат 2010-04-02 / 10.09 pm

    Дачу продам, ж/д ст.\”73км\” 15 мин.пешком, Горьков. напр-е, 6 соток, 2 дома, баня, бассейн. Вода, свет, лес, подъезд всегда. Собственник. 1,7 млн.руб. Торг.
    ri49@yandex.ru

  1008. adalovelace 2010-04-08 / 2.31 pm

    i love your plugin. I just had a little problem with the ‘related posts’ plugin http://fairyfish.net/2007/09/12/wordpress-23-related-posts-plugin/ that leaves the [lang_] tags in the titles of the widget… but is really easy to install.

  1009. istsexshop 2010-04-10 / 12.41 pm

    that you put e.g. in your sidebar.php. Function polyglot_list_langs() accepts one optional parameter true or false that says whether names of languages or flags should be shown.

  1010. Polyglot | Salatti.NET 2010-04-11 / 7.36 pm

    [...] a blog with WordPress, you can easily do the same. How? There is a plug-in for WordPress called Polyglot that you can download and install in your own blog. Polyglot is really easy and fast to set up and [...]

  1011. test : Sahaja Samadhi 2010-04-13 / 10.08 pm

    [...] Polyglot Published: August 11, 2006 Filed Under: Uncategorized Comments are closed. « Previous Post Next Post » [...]

  1012. Crèdits « Roger Valls, comunicador freelance 2010-04-18 / 11.09 pm

    [...] pàgina utilitza addicionalment els plugins Polyglot i [...]

  1013. Felix 2010-04-21 / 10.56 am

    Hi there,

    another question (after repeating once more: thanks for the great plugin)

    I use another wordpress plugin (Wordbook) which sends the posts to Facebook. SInce most of my FB friends aren’t German I would like Wordbook to use the content instead of the (standard language of my blog) German

  1014. Felix 2010-04-22 / 3.53 am

    Oh, some content got lost…

    So I have tried to add a filter for the other plugin function add_filter(WORDBOOK_FUNCTION,lang_picker_respect_more,1) [no proper mark-up here].
    But it doesn’t seem to work. Also changing the default language of my blog to EN (which I don’t really want to do) didn’t help.
    Any Ideas?

    Cheers
    Felix

  1015. Felix 2010-04-23 / 2.17 am

    Hello again,
    it is working now, but seemingly because I changed the standard language to EN. As I mentioned I don’t really want to do this, so if you have any other suggestions, I’m happy to hear them!

    Thanks
    Felix

  1016. rwgsdf 2010-05-25 / 7.43 am

    nice !best wishes for you!

  1017. Thomas Greve 2010-06-06 / 6.58 pm

    Does Polyglot also support Wordpress 3.0?

    Thank you

    Thomas

  1018. 5 plugins para criar um site multi-língua com Wordpress | Templates e Wordpress Themes 2010-06-22 / 4.55 pm

    [...] Polyglot de Martin Chlupac [...]

  1019. Владимир 2010-07-21 / 4.28 pm

    Internet сайт http://www.humoranekdot.ru. Большая коллекция анекдотов. Все советские, российские анекдоты, шутки и приколы в одном месте! На сайте нет цензуры и предварительного отбора публикуемых материалов. Самая полная коллекция историй и анекдотов.

Sorry, the comment form is closed at this time.

© 2004 - 2014 malyfred