From 2d257ae3dfcd623fa943efe784a40739b5340a68 Mon Sep 17 00:00:00 2001 From: wernerkrauss Date: Tue, 29 Jan 2019 08:00:04 +0100 Subject: [PATCH] explain resource url usage for add_i18n_javascript (#8761) see #8748 --- docs/en/02_Developer_Guides/13_i18n/index.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/en/02_Developer_Guides/13_i18n/index.md b/docs/en/02_Developer_Guides/13_i18n/index.md index 93e87dd5e..0523be133 100644 --- a/docs/en/02_Developer_Guides/13_i18n/index.md +++ b/docs/en/02_Developer_Guides/13_i18n/index.md @@ -414,6 +414,11 @@ Requirements::javascript('silverstripe/admin:client/dist/js/i18n.js'); Requirements::add_i18n_javascript('/javascript/lang'); ``` +You can also include the language files from the public resources folder with the resource syntax: +```php +Requirements::add_i18n_javascript('vendor/module:path/to/lang'); +``` + ### Translation Tables in JavaScript Translation tables are automatically included as required, depending on the configured locale in `i18n::get_locale()`.