Jamling / hexo-generator-i18n

Multi-languages generator for hexo.
MIT License
35 stars 10 forks source link

Can't bring array from language file?? #6

Open AhmedBHameed opened 6 years ago

AhmedBHameed commented 6 years ago

I'm using Hexo with i18n plugin to bring info from language files. But i can't bring array the only result i can extract is the single string. If this feature is not implemented then it is required otherwise how can i call array of the language file!!?? regards en.yml

team:
    team_info:
        person_1:
              social_media:
                  facebook: '#'
                  twitter: '#'
                  Instagram: '#'

__('team.team_info.person_1.social_media')

Jamling commented 6 years ago

Sorry, your question is out of the scope of hexo-generator-i18n plugin, the plugin only generates multi-languages deploy-able output htmls. The hexo generates only one language output to public directory without hexo-generator-i18n plugin

The plugin not change i18n in hexo. As I known, your code shouled be __('team.team_info.person_1.social_media.facebook') to output i18n, the array is not bringed.

Another _p i18n function usage can be found here