Different values of .Site.Language.Lang in template and in js file

I have multi language site (english and russian).

In my baseof.html <html lang="{{ .Site.Language.Lang }}"> .Site.Language.Lang contains current site language (“en” or “ru”)

But the same variable in JS script console.log('{{.Site.Language.Lang}}') always contains the same value (“ru”).

Info from hugo env

Hugo Static Site Generator v0.56.3/extended darwin/amd64 BuildDate: unknown
GOOS="darwin"
GOARCH="amd64"
GOVERSION="go1.12.7"

Where should I seek the problem?

Share your code, per Requesting Help. :slight_smile:

Updated first post with links to the files and info from hugo env. Do you need anything else?

Your website seems to be down, can’t reach it.

Do you pass your JS file via a template? If so, you can generate pages locally and just check what’s in your JS file under public/.

A mirror is at https://allthe.codes/maiki/neb-kb/src/branch/master/themes/hugo-book/assets/search-data.js#L15

I generated two sites (english and russian) and under public/ in both sites there is the same value.

I add scripts to html like this:
{{ $scriptJS := resources.Get "script.js" | resources.ExecuteAsTemplate "search.js" . | minify | fingerprint }}
<script defer src="{{ $scriptJS.RelPermalink }}"></script>