Skip to content

Commit

Permalink
explain resource url usage for add_i18n_javascript (#8761)
Browse files Browse the repository at this point in the history
see #8748
  • Loading branch information
wernerkrauss authored and robbieaverill committed Jan 29, 2019
1 parent d2c8530 commit 2d257ae
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/en/02_Developer_Guides/13_i18n/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,11 @@ Requirements::javascript('silverstripe/admin:client/dist/js/i18n.js');
Requirements::add_i18n_javascript('<my-module-dir>/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()`.
Expand Down

0 comments on commit 2d257ae

Please sign in to comment.