Summary

In this chapter, we have seen how to configure multiple languages in our app. We have found out that there are two storage options to handle internationalization: file and database. File is suggested for small projects and database for bigger ones.

We have discovered how to grab placeholders from the entire website through the 'message' command from the console and how to create placeholders that contain formatting information.

Finally, we have configured the database as a storage target for translations, and we have created a complete example to handle room description in different languages.

In the next chapter, we will learn how to create RESTful web services using the new integrated management of Yii 2.

Get Yii2 By Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.