2

I see custom labels used in lightning components are displayed in another language (not in my user language). My org's default and my language is Japanese but they are displayed in English. I also double-checked that these labels were created in Japanese.

This happens in different components and with different labels. If I delete the translation for the labels, they are displayed in Japanese as expected.

How can I fix this? Or Is this a salesforce bug?

1 Answer 1

2

What worked for me: adding an explicit translation for the default language. I had a label in my default language with name and value 'XYZ' and an English translation 'ABC'. Even though I had selected my default language while using my LWC, I still got the English translation 'ABC' in my LWC.

I then added a translation for the default language, with value 'XYZ' (obviously). And now my LWC was displaying 'XYZ'.

So LWC seems to rely on explicit translations for all languages for which you want to see translated values.

1
  • It seems to be working for me too. Thank you!!
    – HappyMe
    Commented Apr 3, 2020 at 0:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .