Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
AhmedBHameed opened this issue Dec 19, 2017 · 1 comment
Open

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

AhmedBHameed opened this issue Dec 19, 2017 · 1 comment

Comments

@AhmedBHameed
Copy link

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
Copy link
Owner

Jamling commented Dec 20, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants