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

  • 9 months ago
Drew McLellan

Drew McLellan 2636 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

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

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