Show content in selected language on Webpages and Blog articles

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.

1 Like

Did you try this?

Haven’t tried this … Shall give it a try and update. :+1:

I was still figuring out the files used while constructing the Webpages

had you tried this method? please let us know does it work or not?

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.

Try to go to Translation list and add your content and translate there

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.

1 Like

Hi Harsh,

have you any chance discovered the solution?

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

1 Like

Thanks for the solution.