本文整理汇总了PHP中Lang::file方法的典型用法代码示例。如果您正苦于以下问题:PHP Lang::file方法的具体用法?PHP Lang::file怎么用?PHP Lang::file使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Lang
的用法示例。
在下文中一共展示了Lang::file方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
*
* UploaderHandler Overrides
*
*/
function __construct($options)
{
$error_messages = \Lang::file('juploader', \Config::get('application.language'), 'errors');
if (count($error_messages) == 0) {
$error_messages = \Lang::file('juploader', 'en', 'errors');
}
if (count($error_messages) > 0) {
$this->error_messages = $error_messages;
}
parent::__construct($options, true);
}
示例2: function
Event::listen(View::loader, function ($bundle, $view) {
return View::file($bundle, $view, Bundle::path($bundle) . 'views');
});
/*
|--------------------------------------------------------------------------
| Laravel Language Loader
|--------------------------------------------------------------------------
|
| The Laravel language loader is responsible for returning the array of
| language lines for a given bundle, language, and "file". A default
| implementation has been provided which uses the default language
| directories included with Laravel.
|
*/
Event::listen(Lang::loader, function ($bundle, $language, $file) {
return Lang::file($bundle, $language, $file);
});
/*
|--------------------------------------------------------------------------
| Attach The Laravel Profiler
|--------------------------------------------------------------------------
|
| If the profiler is enabled, we will attach it to the Laravel events
| for both queries and logs. This allows the profiler to intercept
| any of the queries or logs performed by the application.
|
*/
if (Config::get('application.profiler')) {
Profiler::attach();
}
/*
示例3: json_encode
title: "<?php
echo $config->title;
?>
",
data: <?php
echo json_encode($config->data);
?>
,
actions: <?php
echo json_encode($config->actions);
?>
,
edit_fields: <?php
echo json_encode($editFields['arrayFields']);
?>
,
languages: <?php
echo json_encode(Lang::file('administrator', Config::get('application.language'), 'knockout'));
?>
};
</script>
<?php
echo Form::token();
?>
<script id="settingsTemplate" type="text/html">
<?php
echo View::make("administrator::templates.settings");
?>
</script>
示例4: function
| system to retrieve the response. Feel free to modify this function to
| your tastes and the needs of your application.
|
| Similarly, we use an event to handle the display of 500 level errors
| within the application. These errors are fired when there is an
| uncaught exception thrown in the application.
|
*/
Event::listen('404', function () {
return Response::error('404');
});
Event::listen('500', function () {
return Response::error('500');
});
Event::listen(Laravel\Lang::loader, function ($bundle, $language, $file) {
$lines = Lang::file($bundle, $language, $file);
if (count($lines)) {
Log::debug('Loaded file:' . $bundle . '\\' . $language . '\\' . $file . ' has ' . count($lines) . ' lines');
} else {
Log::debug('Loaded EMPTY file:' . $bundle . '\\' . $language . '\\' . $file);
}
return $lines;
});
/*
|--------------------------------------------------------------------------
| Route Filters
|--------------------------------------------------------------------------
|
| Filters provide a convenient method for attaching functionality to your
| routes. The built-in before and after filters are called before and
| after every request to your application, and you may even create