WP qtranslate custom posts + categories and descriptions + plugin

Just created a plugin that has products and categories for wordpress that needed to be translated. Beacuse of the nice hooks in qtranslate I decided to use it. This is who I fixed it:

In my plugin file I added these lines:

add_action(YOUR-TAXANOMY-NAME_add_form’, ‘qtrans_modifyTermFormFor’);
add_action(‘YOUR-TAXANOMY-NAME_edit_form’, ‘qtrans_modifyTermFormFor’);
add_filter(‘YOUR-TAXANOMY-NAME’, ‘qtrans_useTermLib’);

That worked great for allmost everything, but it did not solve the translation for the category description. To solve that I needed to wrap the output (in my custom template file) with the following function:

echo _e($term->description, ‘qtranslate’);

Oh, and if you want your break rows back, wrap the description with nl2br:

echo _e(nl2br($term->description), ‘qtranslate’);


Comment the post if you need help to get it working =)