For internationalizing my app I need to be able to dynamically access entries in a YAML file.
It is best explained with an example:
Page:
<
With the way your vars are set, it would be something alog the lines of
{{ site.locales[site.default_locale][page.title] }}
The thing is, ... I don't really see the point of doing this. Let's say your page is the english page. The locale should then be defined within the page, and so should your title!
---
locale: en
title: My Wonderful Page
---
Which you can retrieve with {{ page.title }}
...
What could be the point of putting the title into the _config.yml
file?
(edit) well unless you want to access page.title
when in another page/post, in this case you have no choice but to put it into _config.yml
.