WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: Gengo] Gengo & WordPress 2.7 - some nasty flaws (11 posts)

  1. Ivaylo Draganov
    Member
    Posted 5 years ago #

    Hello,

    I am using WP 2.7 for a project which needs to be bilingual. For accomplising this I chose to implement Gengo. The problem is that it works flawlessly only with WP 2.3...

    As a whole it is working good with WP 2.7 except some major problems with filtering the_category,wp_list_categories and the_tags (at least that's what's bugging me the most). When browsing archives (date, tag, search) or in single posts and pages wp_list_categories translates only categories to which the current post is assigned, and the_category does not get translated at all.

    For the_category got round the problem like so:

    foreach((get_the_category()) as $post_cats) {
        echo '<a href="'.get_category_link($post_cats->cat_ID).'">';
        echo get_the_category_by_id($post_cats->cat_ID);
        echo '</a> ';
    }

    But for wp_list_categories and get_categories I don't know what to do... In my understanding (not good with programming), the filter that processes those calls is that (line 232 in gengo.php):

    add_filter('list_cats', array(& $this,'list_cats'), 8, 2);

    and this is the function attached to it(line 1332 in gengo.php):

    /**
     * Translate the categories in lists, if necessary.
     * list_cats is sometimes called with the entire list, which we don't need.
     *
     * @param string $name
     * @param string $category
     */
    function list_cats($name, $category = '') {
    	global $wpdb, $wp_object_cache;
    
    	if (!$category) return $name;
    	return $wp_object_cache->cache['category'][$category->term_id]->name;
    }

    Looks not very complex but I don't understand a thing :)

    this is a known issue:
    http://wordpress.org/support/topic/176510
    http://wordpress.org/support/topic/193803
    http://jamietalbot.com/wp-hacks/forum/comments.php?DiscussionID=214&page=1#Item_0
    http://jamietalbot.com/wp-hacks/forum/comments.php?DiscussionID=252&page=1#Item_0

    Please, if anyone has been tackling this or knows how to fix - drop a few lines :)
    Thank you!

  2. Paolo T. (pixline)
    Member
    Posted 5 years ago #

    I'm trying to get back to Gengo soon, and I'll post some news in a short time. Please try the latest development version, I'm quite sure it's a little more stable, but actually I can't assure you this.

  3. rpetrusic
    Member
    Posted 5 years ago #

    I hope that you will... :-D I am impatient... :))))))))

  4. Paolo T. (pixline)
    Member
    Posted 5 years ago #

    I invite again everyone who can report bugs, submit patches or contribute in some way to join us on the mailing list. I'm going to try again on Gengo, but I really can't do it without the community.

  5. GATEKeeper
    Member
    Posted 5 years ago #

    One site I'm running with Gengo won't even load with Gengo on 2.7. Looking at it in Chrone it says "This webpage has a redirect loop."

    http://www.inkandbeyond.ca/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/

    While IE gets this URL, which obviously doesn't work...
    http://www.inkandbeyond.ca/en+fr/en+fr/en+fr/en+fr/en+fr/en+fr/en+fr/en+fr/en+fr/en+fr/

  6. GATEKeeper
    Member
    Posted 5 years ago #

    Sorry, one more thing - maybe this is obvious, but I can get the site to appear in English, if I uncheck "Gengo should append language codes to permalinks automatically." That means the French version doesn't work though unless I have the link already.

  7. Ivaylo Draganov
    Member
    Posted 5 years ago #

    Fancy permalinks are all screwed up with Gengo and WP 2.7 - you should use default structure if you want your site to function.

    Single post permalinks might work but for categories I could not get a working solution.

  8. Paolo T. (pixline)
    Member
    Posted 5 years ago #

    yes, I know about permalinks, one of the main actual issues. I'm trying to solve this without changing the url scheme (because of seo implications) but is really hard to do it.

  9. zor
    Member
    Posted 4 years ago #

    I am having the same problem with the categories translation. Solved all of them except those related to the wp_list_categories function

    When this function is called (wordpress 2.7.1 and gengo 2.6):

    * At the main page, only the first category remains untranslated
    * At a category page, only the active category is translated
    * At a post page: only the first category remains untranslated.

    ┬┐Any one has a solution?
    I am used to php programming, but not very familiar with wordpress architecture. I prefer to know if this has been solved before starting to change code.

    Thanks!

  10. timtak
    Member
    Posted 4 years ago #

    I am getting a similar sort of behaviour to Zor

    At the main plage, on the first category is translated (reverse of zor)
    At a category page, the category to which the posts displayed belong are translated.
    At a post page only the first categoris is translated.

    I am using 2.7.1

    I see that in a pixiline update of gengo 2.5.3 "category description now escaped properly (thanks to Emmanuel)" Would upgrading to 2.5.3 help the situation?

    Or would it help to do whatever the first poster did?

    I see that Jamie Talbot's forums, and the multilingual blog is down. There is now a google group thanks to pixiline. It would be nice if a forum existed. Google groups often do not work for me.

  11. timtak
    Member
    Posted 4 years ago #

    For the categories view, then LostInNetwork's advice is "Write at least one post in each language in each category and the trouble should be gone."

    That would take me a while to do, so I am not sure if it works.

Topic Closed

This topic has been closed to new replies.

About this Topic