mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Update docs for i18n
This commit is contained in:
parent
5f8eb0806e
commit
a478939ea9
@ -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:
|
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.
|
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
|
```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
|
### Translation Tables in JavaScript
|
||||||
|
Loading…
Reference in New Issue
Block a user