From 143b0d17907e494d8decc3e71285aceb4b2d095c Mon Sep 17 00:00:00 2001 From: Richard Rudy Date: Fri, 3 Jun 2016 16:21:15 -0400 Subject: [PATCH] Adding Locales should be done through YAML Configuring locales via PHP now returns an error as common_locales is a static property. Documentation shoudl reflect this. --- docs/en/index.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/en/index.md b/docs/en/index.md index 0f80cac..84756c2 100644 --- a/docs/en/index.md +++ b/docs/en/index.md @@ -508,10 +508,14 @@ the same as your current page locale. ### Adding a new locale The `i18n` logic has lookup tables for common locales in i18n::$common_locales, which is a subset of i18n::$all_locales. -If your locale is not present here, you can simply add it through `mysite/_config.php`: +If your locale is not present here, you can simply add it through `mysite/_config/config.yml`: - :::php - i18n::$common_locales['de_AT'] = array('German (Austria)', 'Deutsch (Österreich)'); + :::yml + i18n: + common_locales: + de_AT: + name: 'German (Austria)' + native: 'Deutsch (Österreich)' This should e.g. enable you to use `$Locale.Nice` in template code.