HI,
Have been fiddling with creating a Multilingual Website & Blog with ERPNext v14 - (2 Languages - en & es). The Language picker easily translates the navigation menu and author, date etc. But on switching language from “en” to “es” the content remains the same. Tried using custom translations, but doesn’t work.
Any way to show content in selected language on Web pages and Blog articles.
I tried multiple things, but not able to translate web page contents in the selected language. We use the inbuilt page-builder sections to create a webpage - so havent found anything to do the content translation/ switch the content to alternative content in the desired language.
Have already tried this as the first thing when we wanted it to be multilingual. Since then we have tried multiple ways. This is a longstanding issue with ERPnext.
Here is the solution to this if anyone looking in the future:
while creating web pages you have to put text under {{ _(" text here ") }}
for example:
<div>
<h1>{{ _("Welcome to Our Website") }}</h1>
</div>
publish it
Then use “Translation List”. enter language you want to translate.
in source enter
Welcome to Our Website
in translated enter:
Translated Welcome Text
now when you select the language you made the translation it will work.
(if language selection is broken put _lang=<language-string> at the end of the URL)
<language string> examples:
en for English
de for German
P.S If you have html file ready and lazy to put {{ _(" ") }} over text ask AI and it can take care of it very quick