How to add a DropDown Language Picker to the Menu


There isn’t much information all in one place on how to add a “Language Picker” to the Menu. Therefore, below is a link to a Gist as to how I do it from start to finish. The Gist brings together all the essential information on how to implement I18N in one place.

The Gist also includes information on how to add Country Flags to the Dropdown.

This Gist is based on a clean install of Yii2 Basic, but it is also useful to add languages to an existing project. It can be easily adapted for the advanced version of Yii2.

There are already a number of resources online as to how to configure and use the I18N so this Gist briefly covers that but is more focused on the how to add it to the menu.

I hope some find it useful.

1 Like

Thanks for your time and efforts.
Can you write it on Wiki?

1 Like

A Wiki article has been created.


1 Like

Thank you for your contribution