BoltTranslate / Translate

Provides translation for contenttypes.
Other
43 stars 38 forks source link

#192: Make language switcher at new contenttype page configurable #195

Closed tobias-93 closed 5 years ago

tobias-93 commented 5 years ago

This change makes the language switcher at new contenttype pages configurable, as requested in #192. The config-variable show_switcher_on_new can be used to add the language switcher to these pages.

Fixes: #192

bobdenotter commented 5 years ago

The reason for not showing the switcher until after the initial save was done to prevent issues with saving. I believe it had to do with it not being able to set the translated fields, until the record had an actual id assigned, so it needed to be saved first.

Are you certain that this doesn't break in normal usage?

tobias-93 commented 5 years ago

In normal usage, this just influences the locale for which you make the initial text. In our short tests, that works fine.

tobias-93 commented 5 years ago

@bobdenotter Any chance this will be merged soon?

bobdenotter commented 5 years ago

I did some more testing, but this currently doesn't work properly..

To reproduce:

1) edit a "new" record 2) switch to any other language than the default one. 3) edit stuff and save 4) See empty record in the database.

I'm fairly positive that this is correct: "I believe it had to do with it not being able to set the translated fields, until the record had an actual id assigned, so it needed to be saved first."

tobias-93 commented 5 years ago

We no longer use this plugin, so the discussion can be closed.