Why is yii2's internationalization module case-sensitive?

I have currently been dabbling with yii2’s internationalization module but came across a curious behavior and was wandering.

Why does






require separate translations?

I’m storing translation in a database. Is there any way I can make the translations case-insensitive? Or is there a specific reason why this is so?

Because technically these are different strings.

I get that technically these are different strings but from a language standpoint the translation would be the same… varying only in the capital letters and their position. Wouldn’t this lead to an inefficient database? Significantly increasing the size of the required database in most cases?

Should I assume that there is no work around to this?

You can just override Yii::t and downcase it, if you need that. :)

Obviously, the strings you get back will be in all lowercase…

Ok will try that and let you know how it goes thanks all :D

I would be careful and really pay attention to how you case names, classes, functions etc. You will run into problems on Linux boxes (almost all shared hosting) with your code. Windows is not case sensitive but Linux is. I don’t know what you use to work on but this is just meant to be a FYI if you didn’t know.