dereuromark 9 年之前
父节点
当前提交
877e77518e
共有 1 个文件被更改,包括 20 次插入1 次删除
  1. 20 1
      docs/I18n/I18n.md

+ 20 - 1
docs/I18n/I18n.md

@@ -53,7 +53,9 @@ Make sure you included the routes for the Tools plugin for this to work or set t
 
 
 ## Using language in URLs
-Instead of the "easy" session-based way you might want to use URLs like `domain.tld/de/controller/action` instead for the non default-language part (English) of the website. 
+Instead of the "easy" session-based way you might want to use URLs like `domain.tld/de/controller/action` instead for the other languages of the website.
+This can however affect also your view layer as you will have to overwrite the URL generation there to always include the 
+new `language` param.
  
 Switch out the above session check then with
 ```php
@@ -83,3 +85,20 @@ In this case only `/de/...` is a language param, since `/...` (without any) woul
 You can of course also make the regexp here `'language' => 'de|en'` for all languages to be a param in the URL. 
 Only the root `/` would then be allowed to fallback to the default one.
 In this case you should have a canonical (pointed to the root) on that action to avoid it being treated as duplicate content.
+
+
+## Language vs Locale
+A locale is a combination of language and region (usually a country).
+
+Most would not use locales here for the switch, but languages. 
+The locales are merely used internally for the presentation details.
+
+Examples for Germany/German:
+- `de_DE`/`de_AT` are some of the possible locale codes
+- `de` is the language (iso code) and internally uses one of those two locales
+
+Examples for USE/English:
+- `en_US`/`en_GB` are some of the possible locale codes
+- `en` is the language (iso code) and internally uses one of those two locales
+
+See [here](http://sandbox.dereuromark.de/export/) for a list of possible languages and their codes.