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 ?

  • administrators

    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 spanish es, when the request is in en or es language show the normal message, "Hello" -> in english en, and "Hola" -> in spanish es, but if for some reason your request sends de 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 to de to see how it shows the key when there is no value for that key.

  • Thank you.

Log in to reply

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.