tanmuhittin / laravel-google-translate

Translate translation files to other languages using google translate or another translation api
MIT License
424 stars 71 forks source link

Respect casing #6

Closed DanielMalmgren closed 5 years ago

DanielMalmgren commented 5 years ago

I have many one word strings with starts with a capital letter, such as "Name", "Position" etc. After being translated they ended up being completely lower case. Is there any way of respecting the casing of the input string and making the output string similarly cased?

tanmuhittin commented 5 years ago

Have you tried translating the same string using Google Translate itself. Looks like the translation service itself is not respecting cases at all.

Example:

https://translate.google.com/#view=home&op=translate&sl=en&tl=sv&text=Please%20write%20your%20Position

DanielMalmgren commented 5 years ago

Ok, this is weird. I tried back and forth now and it seems like Google does it differently depending on what language you are translating to and from. For example going from spanish to dutch makes my initial capital disappear, but the other way around works. And going from english works no matter what language I translate to. Guess this is not much this plugin can do anything about...