PicoPageFolders is a plugin for Pico which provides MultiLanguage support. Pages are being separated into folders, the file names are being used as their language.
This plugin features a 100% CodeCoverage (wrappers excluded), separated in Unit and Integration Tests.
Pull Requests are welcome!
- Organize multiple languages in a folder
- URL rewriting
- Additional twig variables
- Skip loading of not needed pages
- Adjusted Index and 404 pages
Install via composer: composer require jflepp/picopagefolders
content
|
|- 404
|- en.md
|- de.md
|- index
|- en.md
|- de.md
|- sites
|- articles
|- Page1
|- de.md
|- en.md
Pages:
- index: /
- index-de: /?lang=de
- sites/articles/Page1
- sites/articles/Page1?lang=de
index_page
- current pagelanguage
- current languageother_languages
- other languages available with links (key-value)
Display other languages
{% for lang,page in other_languages %}
<li>{{ lang }} - <a href="{{ page }}">{{ page }}</a></li>
{% endfor %}