• Resolved pixelshrink

    (@pixelshrink)


    Hi, I want to use Translatepress to translate specific pages. If I turn off ‘Use a subdirectory for the default language’ and ‘Force language in custom links’ and then view a translated page, the menu still has the language in the links (e.g. /page/ becomes /fr/page). Is there any way of stopping this please?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support Alex

    (@alexcozmoslabs)

    Hi,

    Is the French langauge your addional langauge? If so, there is no support for this. The additional languages need to have the language slug in the URL. Only for the default language the slug is deactivable.
    If French is your default language, then the slug still appears because of caching probably, so please, be sure you clear it.

    Thread Starter pixelshrink

    (@pixelshrink)

    Thanks very much. French is an additional language. I understand that if you’re looking at an additional language page, then the language will have the language slug in the URL.

    What I’m talking about is when you’re looking at an additional language page, the URLs for all the menu items will have the same language slug in too (e.g. /fr/contact, vs /contact/ when you’re looking at a default language page) – is there a way to switch that off please? I’ve cleared the cache, and tried this in Divi theme and 2020 theme.

    • This reply was modified 1 year, 2 months ago by pixelshrink.
    Plugin Support Alex

    (@alexcozmoslabs)

    To not have the language slug for your menu items? If so, this will mean redirecting always to default language. It may work if you switch off the Force language in custom links option in TP Settings –> General tab, and eventually, add manual redirections for these translated URLs to the default versions of their pages (e.g. /fr/contact –> /contact).

    Thread Starter pixelshrink

    (@pixelshrink)

    Thanks for the workaround. I’ve already switched off Force language in custom links and the menu items still get language slugs. Manual redirects won’t be practical, is there a hook that can stop the language slug being inserted into menu items please?

    Plugin Support Alex

    (@alexcozmoslabs)

    I recommended the redirection method because I thought you wanted this only for your menu items. As I already specified, there is no support for ridding off the language slug from translated URLs. The language slug needs to stay in the path because we are not creating physical versions of the translated post, like other translation plugins, so, in other words, we need like an identifier for the translated version.

    • This reply was modified 1 year, 2 months ago by Alex.
    Thread Starter pixelshrink

    (@pixelshrink)

    Thanks, I do want it only for menu items, I don’t want to get rid of slugs for all pages, and the menu items aren’t translated, it’s that the system is adding the slug to every menu link when you’re looking at a translated page whether it’s translated or not, and I’d like to find a way to stop it doing that just for menus.

    Plugin Support Alex

    (@alexcozmoslabs)

    Hi,

    There is no support for exluding language slug for particular URL, only if you exlcude those pages themselves with Do not translate certain paths feature in TP Settings –> Advanced tab –> Exclude strings section.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Menu links’ is closed to new replies.