To internationalize my application, I need to be able to dynamically access the entries in the YAML file.
This is best explained by an example:
Page:
layout: default
title: title_homepage
Then access to the variable title_homepage in the default template will be allowed:
Default layout:
page.title = "title_homepage"
Now I usually access my _config.yml file as follows:
{{ site.locales[site.default_locale].variable }}
However, now for this I need to access _config.yml with the value page.title. This will not work:
{{ site.locales[site.default_locale].page.title }}
I need the following (pseudocode):
{{ site.locales[site.default_locale].
source
share