Monday, March 13, 2017

Multilingual website, tricks and solutions

I'm going to make a multilingual website (3 languages) . I'm curious, are there any ways or rules how to make it properly? My instrument is Laravel 5.4. Problems I faced: 1) how to store data in database: in a single table with many rows (one per language), or create a few tables (one per language, connected by foreign key)? 2) how to select right language data after user selects locale? I'm not sure, that my method, where I check a locale variable every time, when I need to send data to view, is right. I'm asking because I wonder how maintain and take care of my code. Someone, who have faced the same problems, please I need a trick, any opinion is welcome!



via J.Tim

Advertisement