From a478939ea938b703197e08f40d278c5247d6e7ae Mon Sep 17 00:00:00 2001 From: Damian Mooyman Date: Tue, 26 Sep 2017 10:11:36 +1300 Subject: [PATCH] Update docs for i18n --- docs/en/02_Developer_Guides/13_i18n/index.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/en/02_Developer_Guides/13_i18n/index.md b/docs/en/02_Developer_Guides/13_i18n/index.md index 075add26c..3e2228682 100644 --- a/docs/en/02_Developer_Guides/13_i18n/index.md +++ b/docs/en/02_Developer_Guides/13_i18n/index.md @@ -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('/javascript/lang'); +Requirements::javascript('silverstripe/admin:client/dist/js/i18n.js'); +Requirements::add_i18n_javascript('/javascript/lang'); ``` ### Translation Tables in JavaScript