Hi,
with 1.4.x you can’t select category for certain language, because the plugin store translation as a simple string.
In 1.5 I’m going to create a new wordpress category, but it’s still under development. Beta version is available here: https://plus.google.com/104807878923864213031/posts/eb8cmDgRMsx
The API for manage category is not also implemented, but you can use this code for now:
<?php
/*
$categories is an multidimensional array, the first key is the id of language, the second key is the category type.
Example:
$category = $categories[ 1 ][ ‘category’ ]; //This code return all the post categories that exists in language “1”.
*/
$categories = get_option( ‘cml_categories’, array() );
?>
Maybe you don’t have to do it, because the plugin automatically hook some wp function and remove all categories that doesn’t exists in current language.
if you need to know the id of translated category you can use this code:
<?php
//This function will be renamed in last version
CMLTranslations::get_linked_category( $category_id, $language_id );
?>
Contact me if you need more information 🙂
Hello sir,
I’m using this plugin now but i got some problem in category url,
when I’m currently in my default(English) language, everything is good,
when I click the category link, its working just fine, and when i click the deutch language, the url translation is working just fine, but when i check the url of the link of the category, it shows different link than the current link
Ex:
category title in english is Machines for the sharpening room
category title in Deutch is Maschinen für den Schärfraum
the correct url that returns when i change language from english to deutch is maschinen-fur-den-scharfraum
but when i click the link of the same category as what is currently open, it returns “maschinen-fuer-den-schaerfraum” this slug, which seems that the auto slug for category on other languages seems to have problem in special characters like “ü”.
Hoping for fast reply and help me fix this problem for more greater function of this great plugin