• Resolved omahoung

    (@omahoung)


    Hello,

    I’m encountering a specific behavior related to the URL structure that I’d like to seek your guidance on.

    The issue I’ve observed concerns to the handling of language codes in URLs, particularly in the default language. Here’s a brief description of the problem:

    When I set the default language to include language codes in URLs, I’ve noticed that the behavior of TranslatePress appears inconsistent. For menu links, the URLs do include the language code as expected. However, when viewing the content in the default language, the URLs within the content do not display the language code. Instead, there is a redirected to URLs with the language code.

    While I understand that redirects are manageable by search engines, this behavior could potentially affect user experience and SEO. I’d like to clarify whether this is expected behavior, and if so, if there are best practices or adjustments that can be made to ensure a more uniform and SEO-friendly URL structure.

    I’ve also confirmed this behavior on the TranslatePress demo site, which suggests it’s not specific to my configuration.

    Any insights or guidance you could provide on this matter would be greatly appreciated. If there are settings or options within TranslatePress that I may have overlooked, please feel free to point them out.

    Thank you in advance for your assistance.

    Best regards.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello,

    Thank you for reaching out!

    Based on your description, what you are experiencing is actually the expected behavior of TranslatePress. With the default settings, the main (or default) language doesn’t typically show the language code in the URL directly. However, when changing languages, the code for the selected language is then added. This structure is implemented to keep the URL as clean as possible for your main language users and maintain SEO optimization.

    However, we understand that it might be confusing in some cases when using “Use Subdirectory for the default language”. As a potential solution, we recommend adding existing pages to the menu, instead of directly linking to URLs. This method works more fluidly with TranslatePress’s multilingual system, you should have the correct URL for the default language.

    Please let us know if this works as expected on your end.

    Best regards,

    Thread Starter omahoung

    (@omahoung)

    Hello,

    I’m sorry, but I don’t fully understand the potential solution you mentioned. Could you please clarify what you mean by “adding existing pages to the menu, instead of directly linking to URLs”?

    The menu displays links as expected for the default language, such as https://www.mywebsite.com/en/contact-us. However, within the content of pages, the same URL becomes https://www.mywebsite.com/contact-us.

    If this behavior is indeed expected for TranslatePress, I assume there is no straightforward solution. Anyway, thanks for your response.

    Best regards.

    Andrei

    (@andrei202)

    Hello there,

    Apologies for not getting back to you any sooner!

    The method that I mentioned to you is the first method described in this article:

    https://www.hostinger.com/tutorials/how-to-add-page-to-menu-wordpress

    I tried replicating the behavior which you described on my own instance but my language parameter stays the same.

    Plugin Support Anghel Emanuel

    (@anghelemanuel99)

    Hello there,

    Since 5 days have already passed without getting a reply from you I will mark this ticket as “Resolved”.

    If there’s anything else, please let us know!

    Kind Regards,

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘URL Structure with TranslatePress’ is closed to new replies.