[wp-hackers] Language tabs for post form

Leonid Mamchenkov leonid at mamchenkov.net
Sun Jun 24 18:02:56 GMT 2007

Hi All.

I am trying to add languages tabs ('English', 'German', 'Russian',
etc) to the post form.

I see that so much stuff is setup around post_title being a post_title
and content being content that there is no way I could easily change
those to anything else.  So, the usual CSS/JavaScript approach, where
I would have post_title_en and content_en for English, and
post_title_ru and content_ru for Russian, fails miserably.  It's just
not worth the effort.

My current approach is to have the tabs with onClick events.  I want
to use post_title and content as aggregates.  I found this plugin
Language Switcher:


It basically does everything I want, minus the user interface.  It
uses markup like <lang_en>some text</lang_en><lang_ru>some
text</lang_ru>, which can be easily applied for both post_title and

So, the thing that I am trying to do is to have one form with content
and post_title with a number of language tabs nearby.  When a language
tab is clicked, the values from content and post_title are saved into
JavaScript variable or maybe even a cookie, and the values for the new
selected language are loaded back from variables.  When the post is
saved, values should be aggregated and saved in the post_title and
post_content DB fields.

Is it something that could work?  Is there any better approach?

P.S.: For tab management I use Tabber script from here:
http://www.barelyfitz.com/projects/tabber/ .

Leonid Mamchenkov

More information about the wp-hackers mailing list