Adding extra links to language bar
-
Hi,
I have set up two country-specific wordpress websites and added Qtranslate-x to both.
They are set up using the URL scheme follows:
https://example.com/cn/en – China website in English language
https://example.com/cn/zh – China website in Chinese language
https://example.com/in/en – India website in English language
https://example.com/in/hi – India website in Hindi languageThe two wordpress installs are installed in two folders /cn and /in.
What I would like to do is for each WordPress install, alter the language bar to add links to the homepage of each other language. For example if I am on the page
/cn/en/about-us
then the language bar would have the following pages:*
China (English) -> /cn/en/about-us (active page)
*China (Chinese) -> /cn/zh/about-us
*India (English) -> /in/en/
*India (Hindi) -> /in/hi/
The only difference to the existing language bar is the addition of the two ‘India’ links at the end of the menu.
Now I’ve looked atqtranxf_wp_get_nav_menu_items()
and it seems it should be possible to hard code new items in there, but it would require a fair amount of hacking and overwriting existing functions. I just wanted to know if there was a better way of doing this? Perhaps by enabling languages in the Qtranslate settings and somehow adjusting it there?
- The topic ‘Adding extra links to language bar’ is closed to new replies.