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

How to pass params to HTML tag usage. #174

Open
tmyeahsing opened this issue Aug 2, 2018 · 2 comments
Open

How to pass params to HTML tag usage. #174

tmyeahsing opened this issue Aug 2, 2018 · 2 comments

Comments

@tmyeahsing
Copy link

tmyeahsing commented Aug 2, 2018

For usage like <li data-i18n="message-key"></li>, how can i pass params to the message-key.

Message may be like this: {"message-key": "i18n is very good, it serves $1 developers"}

@shukabum
Copy link

you have to define the message key as a variable first and then you can assign the value to it.
let message_key;

  • message_key="i18n is very good, it serves $1 developers";

    @Soumya26Agrawal
    Copy link

    data-i18n-options as an attribute can be used for dynamically replacing variables with required content
    For usage like

  • ,

    The i18n library will look for {message} inside the translation for the key 'message-key' and replace it with "i18n is very good, it serves $1 developers"

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

    No branches or pull requests

    3 participants