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 set value of an attribute #24

Open
bacloud22 opened this issue Jul 14, 2024 · 1 comment
Open

How to set value of an attribute #24

bacloud22 opened this issue Jul 14, 2024 · 1 comment

Comments

@bacloud22
Copy link

Hi @mthh
Thank you for this handy library.

Is it possible to select an element's tag, and set its value ?
In this example, I would like to set placeholder value.

<input name="title" value="" placeholder="Title">

@MorenoDalFabbro
Copy link

Hi @bacloud23
If this is still a problem of yours you can simply do like this
<input name="title" value="" data-18n="[placeholder]ns:yourTitle>
after that you can just translate it
localize('#title').

https://github.com/mthh/loc-i18next

Everything you need for this case is in the readme of the library

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