Forum
multilanguage site
I am embarking on a multi-language site. I have looked at your [article here] (https://docs.grabaperch.com/perch/building/how-do-i-create-a-multilingual-site/) I'll be using option 1 and creating a folder for each language. My question is, do I copy the entire perch app into each language folder? The article says "You would then build out your pages as normal." But doesn't specify where/how to add the templates. I want them to be able to add new pages for each language.
Also, how is access to the templates and admin area handled in the CMS? Is it for example, domain.com/en/perch/ for the admin for each language?
Hi Kim,
We've built few multi-language sites in the past in the similar way. You'd basically have one CMS ( Perch Admin ) for all the versions. The folder structure where you place all the files looks like this:
The CMS will pick up on this and create a similar structure within Pages tab once you visit any of these pages (DE/Page 3/Page 3.1)
I hope that helps. Damian
Damian,
It helps somewhat, thank you. However, I want them to be able to create new pages with new sections on-the-fly. This won't be a static site. That's more where my question is. It seems by your example the pages are already set up and placed in the root of the site with pre-configured regions, correct? I want more of a dynamic set up. Is that possible?
Hey Kim,
It could be applied for both static and dynamic sites. You'd just have to rely more on routes rather than folder structure. Nonetheless, there is no need for having separated Perch Admin. You can set it up in the way that you'd be able to create new pages and access them for all the languages from domain.com/perch. If you aren't operating on $lang variable then you could create a set of templates within templates/content directory for each language variant.
Best, Damian
Sorry, but I'm getting rather confused by your answer. I'm simple ... very simple. ;-) I'm also visual so when I see things it's easier for me than reading them.
You'd just have to rely more on routes rather than folder structure. Nonetheless, there is no need for having separated Perch Admin. You can set it up in the way that you'd be able to create new pages and access them for all the languages from domain.com/perch.
then you could create a set of templates within templates/content directory for each language variant. Would I set it up this way: templates/content/en >>>> have an entire set of templates here for english templates/content/es >>>> have an entire set of templates her for spanish (ETC for each language.)>
Again, I am new to this and don't want to create a ton of work for myself because I go about it the wrong way to start. I've done that once already and it was not fun. Sorry if these seem like silly questions.
Hi Kim,
Basically, you need to set up how your pages are reached by the user via Perch Routes (https://docs.grabaperch.com/runway/routing/). So for example a route for English pages would be /en/your-page, German /de/your-page and so on.
You have to set up all the routes by yourself. If you have a different set of master pages for each language you can place them inside a /templates/pages/ ( ie. /templates/pages/en/default.php) so when you create a new page you can pick one up from the list. When you create an index page for ie. English version then you can set all the subsequent pages as children - in this way it would be very easy for the user to find their way around and to know on which language version they are operating.
I hope that helps! Damian
Damian,
Thank you for your patience with me. I do appreciate it. I don't have perch runway, I only have perch. I can upgrade, but at this point, this is a bit beyond my grasp of the app. I will look for a developer that can help me with this set up, thank you.