Forum

Thread tagged as: Question

How does Perch handle switching between languages?

Hi,

How does Perch Runway handle switching between languages, if there isn't an alternative language version of a page?

Let's say I have a two language website, English and Spanish. I'll be using the branching technique.

English will be the default, here's my structure

  • home
  • about
  • services
  • contact
  • es
    • home
    • services
    • contact

If I'm viewing the about page in English, and switch to Spanish, which doesn't have an about page, what happens? Will Perch default to the Spanish home page?

Stephen Meehan

Stephen Meehan 4 points

  • 3 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Perch doesn't have a concept of languages as such, so there's no way to switch between languages. You need to add that code to your pages yourself.

If I'm viewing the about page in English, and switch to Spanish, which doesn't have an about page, what happens?

You need to decide what you want to happen, and then implement the code to deal with that.

Thanks for the reply

So, if I created a branched site as per the docs, I'd only be able to switch between the home pages of each language. I guess that makes sense really.

From the docs

  • https://mysite.com/ would be a simple splash screen asking visitors to choose a language (which would simply be links to…)
  • https://mysite.com/en would be the home page for the English version of the site
  • https://mysite.com/fr

I think I'd structure it a little different. English will be the default language so perhaps that'll be https://mysite.com/, on each page I'll have a list of links providing the option to view the branched version https://mysite.com/fr