Yii v2 snippet guide III

Comparing #31 with #32

Revision #32 was created by rackycz rackycz on Feb 12, 2021, 9:17:44 AM.

test

Content

[...]
* [Yii v2 snippet guide III](https://www.yiiframework.com/wiki/2567/yii-v2-snippet-guide-iii)


**Switching languages and Language in URL**
---

 
I already [wrote](https://www.yiiframework.com/wiki/2552/yii-v2-snippet-guide#i18n-translations) how translations work. Here I will show how language can be switched and saved into the URL.
So let's add the language switcher into the main menu:
[...]
**Search and replace Yii::t()**
---

 
Simple usage in format Yii::t('text','text') can be searched using following regex for example in Notepad++. If you want to modify it massively, you can use the "replace" command, also in Notepad++.

```
[...]
```

**Running Yii project in Vagrant. (Simplified version)
 
**
 
---

- Do you want your colleague-developers to use identical environment like you have?
- Or do you want to easily setup whole server after you reinstalled your computer?

This is when Vagrant is helpful.
[...]