Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Multi-Lingual 'Learn2' and Folder Structure

first-time

Started by Ingo Karstein 9 years ago · 1 replies · 878 views
9 years ago

Hi,

currently I try to create a product documention with Grav and Learn2. I want to provide to docu in German and English.

  1. I'd like to use URL based language like https://example.com/**de** instead of different sub domains.
  2. I need to have a language switch in "Learn2".
  3. I need to have different folder names for each language.

Is this possible? Can you give me some hints how to do that?

Thanks!
Ingo

9 years ago

Hi
I don't know the learn2 theme too well but in general your needs are met with built in Grav functionality. I assume you'll be using the admin panel but these bits can be done without it.

  1. Using the url is easier than subdomains I think. In the configuration page of the admin panel it is possible to set your languages, default language and how you'd like to track current language (query string, cookie). You have the option of only showing /de in the url for German and nothing for English if you want.

  2. I assume you mean the language switcher plugin? https://getgrav.org/download/plugins/langswitcher/1.4.0 That should work fine with this theme.

  3. Is this actual folder names on the server or end user page names / url strings? It isn't really necessary to have different folder names if its just for page text you can have one page for two (or more) languages, switch between them in the admin panel write the text and also write a url slug in each language and when you're done the you've got a "widget feature 1" page for two languages with urls in the native language both living out of one folder probably sharing the same images and css etc. Is this what you're trying to achieve?

Suggested topics

Topic Participants Replies Views Activity
Support · by TomW, 2 weeks ago
8 225 8 hours ago
Support · by alex, 2 months ago
8 666 23 hours ago
Support · by Supple, 5 days ago
1 97 1 day ago
Support · by TomW, 1 week ago
3 158 3 days ago
Support · by TomW, 6 days ago
2 105 5 days ago