mirror of
https://github.com/flarum/framework.git
synced 2024-12-11 21:43:38 +08:00
Add English locale template to extension stub
This commit is contained in:
parent
0ca7003a35
commit
65df4c3a33
2
framework/core/stubs/extension/locale/en.yml
Normal file
2
framework/core/stubs/extension/locale/en.yml
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
{{name}}:
|
||||||
|
# hello_world: Hello, world!
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
use Flarum\Support\ServiceProvider;
|
use Flarum\Support\ServiceProvider;
|
||||||
use Flarum\Extend\ForumAssets;
|
use Flarum\Extend\ForumAssets;
|
||||||
|
use Flarum\Extend\Locale;
|
||||||
|
use Flarum\Extend\ForumTranslations;
|
||||||
|
|
||||||
class {{classPrefix}}ServiceProvider extends ServiceProvider
|
class {{classPrefix}}ServiceProvider extends ServiceProvider
|
||||||
{
|
{
|
||||||
|
@ -16,7 +18,14 @@ class {{classPrefix}}ServiceProvider extends ServiceProvider
|
||||||
new ForumAssets([
|
new ForumAssets([
|
||||||
__DIR__.'/../js/dist/extension.js',
|
__DIR__.'/../js/dist/extension.js',
|
||||||
__DIR__.'/../less/extension.less'
|
__DIR__.'/../less/extension.less'
|
||||||
])
|
]),
|
||||||
|
|
||||||
|
(new Locale('en'))->translations(__DIR__.'/../locale/en.yml'),
|
||||||
|
|
||||||
|
new ForumTranslations([
|
||||||
|
// Add the keys of translations you would like to be available
|
||||||
|
// for use by the JS client application.
|
||||||
|
]),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user