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!

user6999
  • 157
  • 1
  • 9
  • The ID won't change in different locales, check this answer for reference : https://craftcms.stackexchange.com/questions/23710/craft-3-language-switcher

    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 04:40

1 Answers1

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 %}
HendrikEng
  • 1,064
  • 5
  • 18