-
Hello, Help please. I have 3 languages Previously, I used this configuration in the link href="/{{ activeLocale }}/page123-my"
Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments
-
just use the page filter like this:
|
Beta Was this translation helpful? Give feedback.
-
It working only with CMS - Pages, some pages i use with module static pages and it not working both. May be have universal solution or how use filter with static pages module. If CMS page no have use href="{{ 'my-page' | staticPage }}" how it make |
Beta Was this translation helpful? Give feedback.
-
for static pages, there's a special filter "staticPage". See Winter.Pages plugin docs |
Beta Was this translation helpful? Give feedback.
-
I think I understand, thank you very much. |
Beta Was this translation helpful? Give feedback.
-
One more question. I have news block with page /news/:slug In language select i use this links to return user on same page with another language when i'm on the page domain.tld/news/happy-2023 and want to swith language i see domain.tld/es/news/:slug I try use href="#" data-request="onSwitchLocale" data-request-data="locale: 'en' what in docs, but it not work because i think turn off prefixDefaultLocale. How get right link in {{ this.page.url }} with :slug page. All other working good. |
Beta Was this translation helpful? Give feedback.
-
The localePicker component will do this:
Otherwise, you can do so manually:
|
Beta Was this translation helpful? Give feedback.
-
I try, it working only if ( plugin config settings ) language not changing. On swith, page reloaded with same language. |
Beta Was this translation helpful? Give feedback.
just use the page filter like this: