how to handle missing translation keys
-
Hi,
I would like to be able to display the translation key if the translation is missing for that key,
Is there a way to achieve this ?
-
hi! hmm i'm a bit confused, you are talking about resources, right? so what i understand from your description is that you want to do something like this:
with a template with content: "{{$localizedResource.greeting}}" that have localized resources in english
en
an spanishes
, when the request is inen
ores
language show the normal message, "Hello" -> in englishen
, and "Hola" -> in spanishes
, but if for some reason your request sendsde
as language you just want to show "gretting", is that true? if yes, then here you have an example that shows how to do it. you can change the language used tode
to see how it shows the key when there is no value for that key.
-
Thank you.