WordPress.org

Ready to get started?Download WordPress

Forums

mLanguage
[resolved] How to add different languages to menu-links (5 posts)

  1. Sommarzan
    Member
    Posted 2 years ago #

    I don't understand how to also change the menu items to different languages?

    If this is supposed to help, it doesnt;

    For titles, you have to write as normal title inside post, the one in the language you have set as default.
    Then you have only to scroll till Custom Fields and add:

    key: the short tag of the language ( the two first letters of the Language Code eg. de, en, fr )
    value: the title text.

    I can't find Custom fields anywhere. Where am I supposed to look?
    Plz help.

    http://wordpress.org/extend/plugins/mlanguage/

  2. keesiemeijer
    moderator
    Posted 2 years ago #

    Look at the"Screen Options" on the top right when you are on the edit Post or edit Page screen if Custom Fields are enabled.

  3. Sommarzan
    Member
    Posted 2 years ago #

    Found it! Thanks! (It's called "Panelinställningar" in Swedish, in case someone else is looking for it.)

    Unfortunately it didn't help.

    This is my problem: I'm using the theme Shuttershot and the widget mlanguage.
    Take a look at http://fredrikmalmberg.se/?page_id=12 - this is the Contact-page.

    This menu is in Swedish and the H1 is also in Swedish. But I want the meny and H1 to be in English or German when the user clicks those flags.

    I have on this Contact-page entered the custom field as suggested, but as you can see the menu is still in Swedish, and the H1 is all fucked up.
    What am I doing wrong?

  4. Alexander Rauscha
    Member
    Plugin Author

    Posted 2 years ago #

    Hi !
    I guess you use the wordpress Menu feature ?

    You can fix the labels at
    Appearance > Menus
    klick on the menu item on the right and change the Navigation Label from Kontakt to
    <span class="en">Contact</span><span class="de">Kontakt</span><span class="sv">KONTAKT</span>

    Do that all with your menu items.

    THe Heading is messed up because your template is using the_title(); inside the title Attribute of the wrapping a tag. You can delete this in your template or change the_title(); to

    <?php
    $title = the_title('','',false);
    preg_match('/<span>(.*)<\/span>/', $title, $m);
    echo strip_tags($m[0]);
    ?>

    Thats the only solution im aware of right now. :/

  5. ychudinova
    Member
    Posted 2 years ago #

    Hello Sirlon! Thanks all for mLaguage!
    Please, put this info to http://wordpress.org/extend/plugins/mlanguage/faq/
    Its very usefull!!!

    And one more question:
    where do I have to put this:
    <span class="en">Contact</span><span class="de">Kontakt</span>
    I try guess, but I don't shure!
    Cause It works only with first part (<span class="en">Contact</span>), and I see in menu Contact
    and other part <span class="de">Kontakt</span> - in menu is nothing about

    Thanks great!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic