I translate the categories to another language, but in the main page, the two language categories are all displayed. How can I filter another language? My WPML version is 2.4.1. I found all the categories are displayed on my theme, is there any way I can get the correspondence between the different language categories, so I can filter it.
2 Answers
First you should upgrade WPML to the latest version, which is 2.4.3 at time of writing.
To properly translate categories you should start by editing the category of the default language. Once you are in that screen (wp-admin/edit-tags.php?action=edit&taxonomy=category&tag_ID=x&post_type=post
where x is the category ID), you will see at the bottom a metabox titled Language. This will show the current language of the category and you will be able to add a translation of it by clicking on the word "Add" under the name of the other language(s) of your site.
-
Hi Piet, thank you for reply. I tried but it doesn't work.I think I need change the code of my theme, because it query all the category and display them. Is there any way I can know which language version the visitors are using? So I can filter the category in the code. Commented May 29, 2012 at 9:12
-
Hi @rocwing very difficult (read: impossible) to say anything that makes sense without being able to see your site and settings.– user2015Commented May 29, 2012 at 12:54
Have you created categories for both languages ? eg. if you have blog category in english then you have to create same as for other language. same for posts.
If yes, then please check if language code filters is applied to archive page or not. if not then you have to make filter for language code.
Thanks, Aezaz