Closed morgrowe closed 3 years ago
Hi @morgrowe ,
I'm fine thanks, hope you are fine too :)
Unfortunately it is not possible now to use arguments with the localize-att-
, it takes only string
with no arguments :(
As a workaround you can put the formatted string in a hidden element then assign it to the placeholder, something like below:
<span id="placeholder-msg" class="d-none" localize-args="new[] { "name" }">
Please provide your {0}
</span>
<input id="my-input" placeholder=""/>
<script>
$(function() {
var msg = $("#placeholder-msg").text();
$("$my-input").attr("placeholder", msg);
});
</script>
Ok cool, no problem at all.
Thanks for the JavaScript work-around and for the quick response. :)
Thanks Morgan
you are welcome :)
Hi Ziya
Hope you're well.
I'm trying to localize an attribute with arguments. To achieve something like this:
I was hoping to something like:
But I can't figure out how to pass the arguments to
localize-att-
. Is this possible? I've probably missed it in the docs.Thanks as always, Morgan