stephenmcd / django-forms-builder

Let users build forms in Django admin
BSD 2-Clause "Simplified" License
691 stars 281 forks source link

Any tip to support multi language for 'response, intro, label' #179

Open sunjoomoon opened 8 years ago

sunjoomoon commented 8 years ago

For multi language sites, any work around with translation for response, intro, label fields? Anybody has any such experiences?

Mirator commented 8 years ago

Hi, did you solved this problem already? If yes, can you please write down how?

barseghyanartur commented 8 years ago

You're most likely would be using a CMS, right? In any case, create two or more forms - one for each language. That's the solution.

sunjoomoon commented 8 years ago

Yes, that is what I do - each for language.

jedie commented 6 years ago

create two or more forms - one for each language

Hm. It's more a work-a-round than a good solution, isn't it?

What's about to use django-parler for the form labels and the other Text fields?

barseghyanartur commented 6 years ago

@jedie:

Honestly, I don't think this package delivers a good solution to any of the issues/problems it's supposed to address. :)

jedie commented 6 years ago

I currently work on a solution without parler:

I add a FormTranslationModel() that will contain translations for a form...

The idea is:

  1. create a form in default language (settings.LANGUAGE_CODE)
  2. create a translation for all lables in one of the languages from (settings.LANGUAGES)
  3. render the form will used the translation, if available or fallback to default language

But it's not ready to use, yet. I will create a pull request, if i have a working proof-of-concept...

jedie commented 6 years ago

I add a proof-of-concept with pull #214

And add some screenshots, how it worked:

https://github.com/stephenmcd/django-forms-builder/pull/214#issuecomment-360179489

thongly commented 5 years ago

I'll be trying this as well. Anymore graceful solutions you have come up with since this thread died?