2

I have a condition that checks entry Id. The condition seems to not work for Japanese locale but works fine on English. I would think that entry ID remains the same irrespective of the locale. Please confirm or correct me if I'm wrong.

Thanks!

  • The ID won't change in different locales, check this answer for reference : craftcms.stackexchange.com/questions/23710/… You could also test it in your templates e.g. {{ craft.entries.siteId(1).one().title }} {{ craft.entries.siteId(0).one().title }} – HendrikEng Nov 26 '18 at 21:13
  • Sounds like a perfect valid answer to me @HendrikEng if you want to add it. :) – Brad Bell Nov 27 '18 at 4:40
3

The ID won't change in different locales, check this answer for reference: Craft 3 language switcher

You could also test it in your templates e.g. :

{% for locale in craft.app.sites.getAllSites() %}
    {{ craft.entries.siteId(locale.id).one().id }} : {{ craft.entries.siteId(locale.id).one().title }}
{% endfor %}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.