mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #7400 from open-sausages/pulls/4.0/expose-i18n
Update docs for i18n
This commit is contained in:
commit
f981d09080
@ -398,9 +398,12 @@ the browser: The current locale, and the default locale as a fallback.
|
||||
The `Requirements` class has a special method to determine these includes:
|
||||
Just point it to a directory instead of a file, and the class will figure out the includes.
|
||||
|
||||
If using this on the frontend, it's also necessary to include the stand-alone i18n
|
||||
js file.
|
||||
|
||||
```php
|
||||
Requirements::add_i18n_javascript('<my-module-dir>/javascript/lang');
|
||||
Requirements::javascript('silverstripe/admin:client/dist/js/i18n.js');
|
||||
Requirements::add_i18n_javascript('<my-module-dir>/javascript/lang');
|
||||
```
|
||||
|
||||
### Translation Tables in JavaScript
|
||||
|
Loading…
Reference in New Issue
Block a user