How to create Tamil Language Based Web Application in Laravel 5.4

僤鯓⒐⒋嵵緔 提交于 2019-12-06 16:13:05

You can create web apps using laravel's Localization. For that, you need to create language strings. Language strings are stored in files within the resources/lang directory.

You need to create locale:

Route::get('welcome/{locale}', function ($locale) {
   App::setLocale($locale);

   //
});

Then create file within that directory and save it messages.php name like this:

<?php

   return [
      'welcome' => 'Welcome to our application'
   ];
?>

Then you need to use this as in any blade file like:

@lang('messages.welcome')

Also, please read the laravel docs from here: enter link description here

In your encoding defined at DB and front end use - UTF-8 encoding which supports most of the international languages

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!