Localization in customized home page

Hello,

in version 1.14 of gitea, I had the following in my customized home.tmpl:

{{if eq .Lang “de-DE”}}

Willkommen auf dem Git-Server …


{{else}}

Welcome to the GIT server …


{{end}}

After upgrading to version 1.17.1, this does not work any more, all information is displayed in English. Can this if-clause be “translated” to version 1.17.1 so that I do not have to rewrite my whole home page template?

Regards
Christoph

You’ll want to provide Gitea with customized language files. How to do so is in the Gitea documentation, but - basically - on an Ubuntu server, you go get the English and German language files from the Gitea project repository, and copy them into /var/lib/gitea/custom/options/locale

Then you make your desired changes and restart Gitea.
So, to achieve what you want, you won’t have to make any changes to the home page templates.

What you wrote is exactly the opposite of what I want to do. Because, I did not mean how to avoid changes of the default home.tmpl, but how to avoid changes of my own home.tmpl, thereby also avoiding the need to create customized language files. So, my question is if it is possible to change the if-clause in my home.tmpl in a way that makes it work again. By the way, the if-else-clause defines that English language should be chosen for all other locales than de-DE, something that I don’t know how to realize with language files.