Support » Plugins » Bilingual with 2 textarea and automatic <lang_xx> tag

  • Hi all,
    I try to build a little hack for a bilingual wordpress :
    first, I install the Polyglop plugin. no problem.

    Then, I would like cut the admin textarea (from the edit-form.php fil in wp-admin folder) in 2 parts and automatically insert language tags.
    It’will be user friendly for the admin.

    initially, I have:

    PHP:
    <div><textarea rows=”40″ cols=”40″ name=”content” tabindex=”4″ id=”content”><?php echo $content ?></textarea></div>

    Actually, I build this

    PHP:
    <div><textarea rows=”<?php echo $rows; ?>” cols=”40″ name=”content1″ tabindex=”4″ id=”content”><?php $content1 ?></textarea></div>
    <div><textarea rows=”<?php echo $rows; ?>” cols=”40″ name=”content2″ tabindex=”5″ id=”content”><?php $content2 ?></textarea></div>
    <input name=”content” type=”hidden” id=”content” value=”<?php echo $content = “<lang_en>” . $_POST[‘content1’] . “</lang_en><lang_fr>” . $_POST[‘content2’] . “</lang_fr>”; ?>” />

    It give me:
    <lang_en></lang_en><lang_fr></lang_fr>

    but I can’t pass the $content1 and $content2…
    Thank you for your help 🙂

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Bilingual with 2 textarea and automatic <lang_xx> tag’ is closed to new replies.