跳至内容
菜单
此问题已终结
2 回复
824 查看

I'm having an issue with Odoo 18 website. The default language is EN, additional languages are DE & ES. When on one of these on a mobile device and then clicking on the EN flag, it doesn't show the EN version, stays on the other language. But when I add /en to the URL, it works. How can I fix this without having to add the /en? 

Is there a setting somewhere that forces Odoo to use the language prefix in the URL?

形象
丢弃
编写者 最佳答案

Hi Ritik,

thanks, but unfortunately I've tried all of these. Also, there is no Language menu item on Website -> Configuration. There is no issue with changing languages on the frontend if on laptop/desktop, only on mobile devices.

I also followed these troubleshooting steps without success - nowhere can I (de)select "Use language prefix" setting in Odoo 18 for URL's. These suggestions on a google search delivered no solution:

2. Language Prefixes in URLs:

  • Default Behavior:
    Odoo might automatically use language prefixes in URLs for multilingual websites.
  • Troubleshooting:
    If you encounter an issue where the default language version isn't displayed correctly, you might need to manually add the language prefix (e.g., /en) to the URL.
  • Example:
    If the default language is English (EN) and you are viewing the website in another language (DE or ES), clicking on the EN flag might not take you to the English version unless you manually add /en to the URL.
  • Settings:
    Check for any settings within Odoo that might control the use of language prefixes in URLs. 

So, I'm still not sure where to fix this.

Thanks for your suggestions though, appreciate it.


形象
丢弃
最佳答案

✅ Issue:

Odoo 17 adds language prefixes to all URLs (e.g., /en, /fr), even for the default language. You want to avoid showing the prefix for the default language.

✅ Solution:

  1. Go to Website App → Configuration → Languages
  2. Open the default language (e.g., English)
  3. Enable: “Use by default”
  4. Disable: “Prefix URLs with language code”
  5. Save changes.

If it still doesn’t work:

  • Make sure only one language is marked as "Default".
  • Clear the website cache and restart the Odoo service.

形象
丢弃
相关帖文 回复 查看 活动
0
1月 25
848
0
12月 24
1305
2
1月 23
1765
1
3月 15
7472
2
3月 22
7104