How to use localize-content with JS? #31
Answered
by
LazZiya
Sayed-Mahmoud
asked this question in
Q&A
-
an example: |
Beta Was this translation helpful? Give feedback.
Answered by
LazZiya
Feb 15, 2022
Replies: 1 comment
-
Create a hidden HTML item with the localized text, then grab its value with js. <i style="display:none;" id="txt" localize-content>Delete</i>
<script>
var delText = document.getElementById("txt").innerText;
var button = document.createElement('a');
button.appendChild(document.createTextNode(delText));
...
</script> |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Sayed-Mahmoud
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Create a hidden HTML item with the localized text, then grab its value with js.