如何在Laravel 5.4中创建基于泰米尔语的Web应用程序

问题描述:

我计划用不使用英语的泰米尔语创建百货商店Laravel Web应用程序.怎么做?

I planed to create Departmental Store Laravel Web Application in Tamil Language Not Using English. How to do it?

您可以使用laravel的本地化功能创建网络应用. 为此,您需要创建语言字符串.语言字符串存储在resources/lang目录内的文件中.

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.

您需要创建语言环境:

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

   //
});

然后在该目录中创建文件并将其保存为messages.php这样的名称:

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')

另外,请从这里阅读laravel文档: 在此处输入链接描述

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