Add note about site.locale and matching it with ui-text.yml

- Close #284
This commit is contained in:
Michael Rose 2016-04-27 10:33:53 -04:00
parent a01f5dbecd
commit fdc6c9e9c4
2 changed files with 11 additions and 3 deletions

View File

@ -22,7 +22,10 @@ Take a moment to look over the configuration file included with the theme. Comme
*Example:* `locale: "en-US"` sets the `lang` attribute for the site to the *United States* flavor of English, while `en-GB` would be for the `United Kingdom` style of English. Country codes are optional and the shorter `locale: "en"` is also acceptable. To find your language and country codes check this [reference table](https://msdn.microsoft.com/en-us/library/ee825488(v=cs.20).aspx).
Properly setting the locale is important for associating localized text found in the [**UI Text**]({{ base_path }}/docs/ui-text/) data file. For more information on that see below.
Properly setting the locale is important for associating localized text found in the [**UI Text**]({{ base_path }}/docs/ui-text/) data file. An improper match will cause parts of the UI to disappear (eg. button labels, section headings, etc).
**Note:** The theme comes with localized text in English (`en`, `en-US`, `en-GB`). If you change `locale` in `_config.yml` to something else, most of the UI text will go blank. Be sure to add the corresponding locale key and translated text to `_data/ui-text.yml` to avoid this.
{: .notice--warning}
### Site Title

View File

@ -9,8 +9,13 @@ modified: 2016-04-13T15:54:02-04:00
Text for various UI elements, `_layouts`, and `_includes` have all been grouped together as a set of translation keys. This is by no means a full-on i18n solution, but it does help make customizing things a bit easier.
Currently all of the keys in `_data/ui-text.yml` are English only. If you're are interested in localizing them into other languages feel free to submit a pull request and I will be happy to look it over
Currently all of the keys in `_data/ui-text.yml` are English only[^yaml-anchors]. If you're are interested in localizing them into other languages feel free to submit a pull request and I will be happy to look it over.
[^yaml-anchors]: `en-US`, and `en-GB` use [YAML anchors](http://www.yaml.org/spec/1.2/spec.html#id2785586) to reference the values in `en` as to not repeat them.
Many of the label based keys like `meta_label`, `categories_label`, `tags_label`, `share_on_label`, and `follow_label` can be left blank if you'd like to omit them from view. It really depends on you and if you want an even more minimal look to your site.
![UI text labels]({{ base_path }}/images/mm-ui-text-labels.jpg)
![UI text labels]({{ base_path }}/images/mm-ui-text-labels.jpg)
**Note:** The theme comes with localized text in English (`en`, `en-US`, `en-GB`). If you change `locale` in `_config.yml` to something else, most of the UI text will go blank. Be sure to add the corresponding locale key and translated text to `_data/ui-text.yml` to avoid this.
{: .notice--warning}