Using locale & language tags from page instead of site#4679
Using locale & language tags from page instead of site#4679alloystorm wants to merge 2 commits intommistakes:masterfrom
Conversation
|
I have my website running with this change. For example this page: https://vrstormlab.com/dancexr/ |
|
I don't think |
|
Here's my new idea: Since all templates end up being rendered in <!-- _layouts/default.html -->
{% assign locale = page.locale | default: site.locale %}
<!-- everywhere else -->
{{ site.data.ui-text[locale].blahblahblah }}If you'd like to proceed, consider taking this approach or we can discuss another idea that you find better. |
This is an enhancement or feature.
Summary
By using the locale tag from the page, it allows different language pages on the same site.
Context
Previously it only allows a site to have only one language, which limits the ability to create multi-lingo sites.
With this proposed change, the pages are rendered using the locale tag from the page front matter, so that you can create pages for different languages on your website.