Could you tell me please how i can get current language name or somthing like this.
I want customize Locale Switcher on web site based on October CMS.
It will be greate to recevie something like
...
{{ set var = ****.getLocale();}}
...
then use it for switch($var){}
...
In twig you can access the current language with {{ activeLocale }}, the full language name with {{ activeLocaleName }} and an array with all locales available with {{ locales }}.
You could use {{ dump() }} to see all variables available on a page. If you try it you will find the locale variables right there as well.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With