Replies: 1 comment
-
You can get an entry across any other sites it is enabled for by calling its {% set localizedEntryByLanguage = entry.getLocalized().all()|index('language') %}
{#
Result:
{
'de': [DE-localized entry],
'fr': [FR-localized entry],
...
}
#} Does that help? If not please ellaborate a bit on what exactly you’re looking for, because I’m not sure I’m following you. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It would be nice to have a feature to get the current entry in its enabled languages without changing the current site. Example:
/de/example-entry
would return the content (entry variable) in german, but the rest of the page is in the primary site language./nb/example-entry
would return the content (entry variable) in Norwegian, but the rest of the page is in the primary site language. And so on.In all cases where my team and I have used "Let each entry choose which sites it should be saved to" as the propagation method for a section. Clients have wanted that only the entry content is translated and not the whole site.
I know we can solve this by adding
.siteId(1)
to all queries, such as navigation, related entries, categories (from a structure), etc. that are not related to the current entry. The same goes for translation files. But this is a lot of extra to keep an eye on when one only want to translate the content of an article and not the full site.Beta Was this translation helpful? Give feedback.
All reactions