ERPNext Foundation ERPNext Cloud Chat Blog Discuss Frappé* Donate

Multilingual website feature


#1

Hi Max, I read your post about the multi-lingual support, it had website as well. Please can you tell me more about it. I am about to start the multi-lingual website project so if that is something you are already doing then I will stop right now. :slight_smile:

I saw the PR but it has nothing about the multi-lingual support to website.


#2

Hi @KanchanChauhan!

Since I enabled the Translation in a record-level for ERPNext, and frappe, I take care of enable jinja templates translation also.

In the multi-lingual request you will be able to translate almost all field contents, so let’s think in Website Page.

The requirements to turn one WebSite multi-lingual are:

  • Enable translation in to Content Fields (By Default, I already make a patch for that, but patch dont work for new instances)

  • Translate all the page content, to the target languages, in case of an tranlation of an “Text Editor”, each HTML tag into the translatded content matter.

    Let suppose:
    en: Original Text
    pt-BR: Texto Original
    es: Contenido Original

  • Build an localization Menu, on the menu, you only need to pass an URL argument _lang= with the target language, eg: to translate the website to Brazilian Portuguese, http://mysite.com?_lang=pt-BR


#3

Sorry for annoying you again Max, I was trying to get it working. This is what I did.

Where am I going wrong. Actually it looks like jinja template is not working.


#4

@KanchanChauhan, I dont think you got nothing wrong, I think that the issue is regard of the changes that netchampfaris made into the project to merge it into the core.

Look this

And this

Various aspects of my original code, that ensure the multi-lingual behavior, have been removed, by netchampfaris on pull request acceptation.

Sorry, for this, but I make my post, with the features that I already delivered for frappe, not in basis of what was accepted and what was not.


#5

@KanchanChauhan can I turn this topic public?

Since, the thing that you discovered, maybe will affect others into the future?


#6

yeah I saw that, your patch is also removed to update existing fields.

So I was able to get the translation working in website. :slight_smile:

My next question is how do we translate the menus and also the URL. We will need a language selector as well. I will work these things and connect with you to discuss further if that is ok with you.


#7

#8

@KanchanChauhan Ok, in case of doubts, I’m available.


#9

Is this possible nowadays by default? Can we make multi-lingual websites like with many other CMS? This has been a little bit of bottleneck here. :wink:


#10

Someone know if we can use url redirection with nginx to get website translation work. I mean is it possible to configure nginx for when user add /en/ or /fr/ it will add parameters _lang in url automatically?

Thanks


#11

The Multilingual PR had a lot of changes affecting different parts of the framework, what we did was break the PR into small features and merged it.

Understand that changes in core framework are very sensitive. If there are any problems, they could multiply in ERPNext.

So, the current website module translates some of the text and not everything. We can fix them one by one if we list down these things.


#12

It this my implementation of NGINX url rewrite from add language support in the website section of Erpnext.
nginx_erpnext.conf


#13

Do we have any documentation link for this “Multilingual PR split into small features” because I can’t visually see this multilingual stuff appearing anywhere in the system? Using v10.1.28 (master).