Skip to content

Commit

Permalink
Add note about site.locale and matching it with ui-text.yml
Browse files Browse the repository at this point in the history
- Close #284
  • Loading branch information
mmistakes committed Apr 27, 2016
1 parent a01f5db commit fdc6c9e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
5 changes: 4 additions & 1 deletion _docs/05-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
9 changes: 7 additions & 2 deletions _docs/07-ui-text.md
Original file line number Diff line number Diff line change
Expand Up @@ -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}

0 comments on commit fdc6c9e

Please sign in to comment.