Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Author Gunu

    (@grafcom)

    @arnisraido,

    the link itself does not need an add as /en or /fr, only the title of the link is in different languages.

    I hope I have understood what you meant.

    You use the widget?

    Thread Starter arnisraido

    (@arnisraido)

    What do You mean “Only title is different”?
    I am not using plugin. I add links manually in main menu.

    OK, if I need 2 language links in main menu

    English
    French

    So the links in main menu should be

    https://site/en
    https://site/fr

    If I add them to main menu, and set links with/or without full sitename – the links all are rewritten to

    if I am in ENGLISH version:

    <a href="https://site/en">En</a>
    <a href="https://site/en">Fr</a>

    or

    if I am in FRENCH version:

    <a href="https://site/fr">En</a>
    <a href="https://site/fr">Fr</a>

    Plugin Author Gunu

    (@grafcom)

    I am not using plugin.

    You do!

    Widget, or anything else

    Thread Starter arnisraido

    (@arnisraido)

    Sorry, i mean – I AM using qtranslate-x plugin for multilanguage site.
    But I am not using anything extra for main menu links. Just plain links ??

    Anything more, how to explain?

    Plugin Author Gunu

    (@grafcom)

    @arnisraido,

    have you read this article?

    Also you can download the latest beta version which has more possibilities with cookies. You can download it here

    Success

    Thread Starter arnisraido

    (@arnisraido)

    @gunu

    I think, there is nothing to do with cookies.

    What I want –
    – to be able enter custom link in main menu, with fixed language in link, like this:
    https://www.domain.com/en/
    https://www.domain.com/fr/

    – then – Open the webpage and _see those links as they are added to main menu_

    At this moment – if I will go to header.php template file, and enter those links there – they will stay “as is”.

    But if I enter them into Main menu – they are automatically rewritten to “the current language, I am at the site”…

    It seems, this is not possible at this moment?
    Then –
    this tutorials will not work either

    Plugin Author Gunu

    (@grafcom)

    @arnisraido,

    you have links in the menu (Appearance – Menus – Links)?

    link 1 = mysite.com/en
    link 2 = mysite.com/fr

    I tried this on my test site.

    Unchecked – Hide URL language information for default language in the language settings. With latest beta version.

    Works here.

    Thread Starter arnisraido

    (@arnisraido)

    Ok, I have not tried with beta, with latest live – did not work.
    I will try beta.

    Plugin Author Gunu

    (@grafcom)

    @arnisraido,

    May I ask what the purpose is to make it so?

    Thread Starter arnisraido

    (@arnisraido)

    Because – it has always been a problem for me – after installing Qtranslate, to add fixed links (usually, with language iso code (En, Fr, …) or flags somewhere in “header” section.

    One way – to use Qtranslate Language selection widget. But not all themes supports widgets in header.
    You can always add them hard-coded in header.php template.

    But – all themes has “main navigation” menu. And it seems – it is much more easier to add this link in main menu and it afterwards with css.
    IMHO.

    But may be You have better solution?

    Plugin Author Gunu

    (@grafcom)

    Seen this? – Under Appearance – Menus – there is a Language Switcher

    If it is not visible – Screen Options – check Language Switcher

    This helps you?

    Plugin Author Gunu

    (@grafcom)

    @arnisraido,

    is this solved now?

    Plugin Author John Clause

    (@johnclause)

    @arnisraido: please read FAQ topic “How can I prevent URL of a custom menu item from being converted”.

    Plugin Author John Clause

    (@johnclause)

    And, just in case, use the latest version from GitHub, for example, https://github.com/qTranslate-Team/qtranslate-x/archive/3.2.9.8.4.zip, since this feature ‘setlang=no’ was broken in some earlier versions, not sure which one you use.

    Thread Starter arnisraido

    (@arnisraido)

    Nice!

    After upgrade to 3.2.9 (plugin update from admin),
    ?setlang=no – started to work.

    Now I have link https://sitename.domain/fr/?setlang=no

    in main menu. And it works!

    Previously had 3.2.7 version – ?setlang=no did not worked.

    Thank You!

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Language links in main menu – language rewritten’ is closed to new replies.