Open harfyt opened 4 years ago
Hello!
Yeah that use case isn't working right now. If you use custom ids, you should be using a string, anything variable wouldn't work with $localize
right now unfortunately.
What's your use case that is requiring a dynamic id?
Hello! Yeah that use case isn't working right now. If you use custom ids, you should be using a string, anything variable wouldn't work with
$localize
right now unfortunately. What's your use case that is requiring a dynamic id?
My API in some cases return data with keys of translation json file. So I need to translate it at runtime.
A workaround that I came up with is to store initially translations in window object but it's not elegant.
window['mytranslations'] = data.translations;
Hello, and thanks for this library.
I'm trying to get a translation in typescript with a variable id.
Using
$localize`:@@${my_key}:`
doesn't work so I was wondering if there is any workaround.The way I load translations is the following: