I like the interface of the Double field module.
How about adapting that technique?

Comments

Andy Inman’s picture

I had thought of doing something like this, but using vertical tabs. Are you talking about node bodies or other text fields?

johnv’s picture

Well, bodies are just as any other field.... So, both! :-)
IMO the only change is having a 1-line entry field, or a multi-line entry box.
For most cases the simple text field would suffice.

johnv’s picture

O ja,
for the left subfield, you could then use fancy formatters: ISO2-code, full name, colourfull language-icon icon, ...!

drupalina’s picture

+1 for this feature
@netgenius did you manage to get the vertical tabs to work with this module? Could you attach some code?

Another possible way to make the UI more user-friendly is to do like the qTranslate plugin in wordpress
Multilingual tabs

Thanks.

Andy Inman’s picture

Hi Drupalina, it's not something I've needed, so unless/until one of my clients wants something like this, I doubt if I will spend time on it. Please see also my reply to your post at https://drupal.org/node/2109443

drupalina’s picture

Hi netgenius. Which one is your reply in that thread? Jaypan or casaran?

As per this issue, I have managed to achieve a tabbed UI like in the screenshot simply buy using the good old Fieldgroup module and by creating 3 textarea fields for each language. The trouble is that LS works only through filters. It would be a great contribution to Drupal's multilingual suite if LS allowed for a possibility to assign a language to a whole textarea field by inserting some kind of automated =en= to the $value of the textfield. That way it would be possible to bring together several multilingual fields into the same node form - something that Entity Translations is not doing and is very far from achieving (which is why I have switched to LS). But that requires inserting "invisible" =en= markers and I'm trying to find a work-around or a glue module here http://drupal.stackexchange.com/questions/88615/how-to-inject-text-into-... . As the creator of this module you are most welcome to share your thoughts and insights in that thread.

Andy Inman’s picture

Hi again drupalina,

I'm not sure LS is the best solution for you. If I understand correctly, you've decided not to use standard Content Translation, translatable Fields and Entity Translation for whatever reasons. A separate Field for each language would be seem sensible, then you can use Fieldgroup to provide tabs for content creation and editing as you have now done.

For content display, you would then need some way of displaying only the text for the relevant language. You could do that with some fairly simple changes to template files, or maybe a module which hooks in at some point and somehow selects the correct Field for display. Do that probably with theme functions/hooks, but maybe node/entity hooks - I don't know what would be the best approach.

https://api.drupal.org/api/drupal/modules%21field%21field.module/functio... may be worth a checking.