Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Support

Multi-Lingual 'Learn2' and Folder Structure

first-time

Started by Ingo Karstein 8 years ago · 1 replies · 547 views
8 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

8 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 Thomas, 1 week ago
2 57 14 hours ago
Support · by Anna, 3 days ago
2 65 17 hours ago
Support · by Justin Young, 18 hours ago
1 33 18 hours ago
Support · by Duc , 1 week ago
2 68 5 days ago
Support · by Colin Hume, 1 week ago
2 60 6 days ago