Forum
perch navigation with multi language
I am using strategy two from this page https://solutions.grabaperch.com/architecture/how-do-i-create-a-multilingual-site
But I am not sure when user has switched to Spanish language, how do I show nav text from spanish?
My navigation remains same, I need to switch language and title to the language selected
Have you added a Spanish title to the page attributes?
I have added below in default.html above seo.html
Ok. Are you then using those in your Spanish navigation template?
How do I do that. My navigation template on global/nav.php looks like below:
Where you have this:
switch it out for templates that use the Spanish fields when you want to show Spanish navigation.
(y) got it..
how about page title, how can i switch them as well?
Yes, you'd do the same thing for the page title - just switch the template.
I am not sure how I can switch for title, my title in global/header.php file looks like this
here is how i am calling global/header from pages files
For your default language, use
perch_pages_title()
and then when you want a different language use e.g.