Skip to content

A question about the locale #2115

Answered by kungfux
SoumyaK4 asked this question in Q&A
Dec 13, 2024 · 3 comments · 4 replies
Discussion options

You must be logged in to vote

Hmm, thanks for asking @SoumyaK4. I thought it works dynamically, but I never got a chance to see it in action.

You can use Chrome DevTools / Sensors / Location to test site behavior based on locale.

Here are my observations.

The config says:

If it has the same name as one of the files in folder _data/locales, the layout language will also be changed,
otherwise, the layout language will use the default value of 'en'.
lang: en

So, if lang is not set, then en should be used by default.

If you build a website locally and check for example _site/index.html, you will find that text values are already set based on lang. Also, there are no javascript files that use files from the locale folder…

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@SoumyaK4
Comment options

@tis-starlight
Comment options

@SoumyaK4
Comment options

Comment options

You must be logged in to vote
1 reply
@SoumyaK4
Comment options

Answer selected by SoumyaK4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants