Resources

My Agape try

Your Agape try


Support Forum

You must be logged in to post Login Register

Search 
Search Forums:


 




Wpml - Category Name Filter Issue

UserPost

4:42 am
July 27, 2010


jli

New Member

posts 1

1

Hello Kevin and All,

So i've been facing some problem with a particular case in using both wpml and role scoper together.

When you translate a category in wpml and use the same name for both the original and the translation wpml appends @languageCode to the translation name to avoid duplicates. (eg: original name is "Home" - dutch translation "Home @nl").

So far so good, then what wpml does is filter the output to remove the @nl (sticking with my example).

The problem is that when role scoper is enabled, this filtering is not occuring as expected, so you end up with Home @nl being displayed on the front-end which is not very sexy ;-)

I did a temp fix for this by adding a custom filtering function that is here :

add_filter('list_cats','wpml_filter_fix');
function wpml_filter_fix($string){
    $string = str_replace('@'.ICL_LANGUAGE_CODE, '', $string);
    return $string;
}    

I can help dig into the rolescoper code but for now i have no clue where to look, I think you'd be much more aware on this kevin, so if you have a clue and want me to look at it, just point the direction ;-).

Ps: I still didn't had time to check the effect of the beta release on custom post types but i hope i will get some soon ! Thanx for your work anyway!


Update: updated my function to make it a filter ;-) much cleaner i think ^^

7:16 am
June 29, 2011


Kevin

Admin

posts 2503

2

This WPML compatibility issue was fixed in Role Scoper 1.3


About the Agapetry forum

Currently Online:

13 Guests

Maximum Online: 150

Forums:

Groups: 2

Forums: 7

Topics: 1249

Posts: 5659

Members:

There are 1261 members

There are 1 guests


Kevin has made 2503 posts

Top Posters:

metal450 - 178

Ragnar - 108

YikYak - 70

whiteorb - 49

Daisy - 35

Administrator: Kevin | Moderators: Kevin