Ligonsker's avatar

Translation of capitalized and non-capitalized English word

Hi,

using the JSON translation, I currently have to have separate keys for capitalized and non-capitalized words, for example:

"addresses":  "<some translation>",
"Addresses":  "<same translation as above>"

but in the language I want to translate there is no such thing as capitalization.. so I currently have to manually add both versions every time (because many times the English version in the website has either capitalized or not)

Is there any workaround for this?

Thanks

0 likes
2 replies
tykus's avatar

Javascript is case-sensitive, so there is no workaround for directly accessing values on the Object values using their correctly cased keys.

What is the wider context here; why do you need similar keys like addresses and Addresses; how are you using these keys?

Please or to participate in this conversation.