Naming Conventions – What Language to Use for Business Class Names?

naming

I'm requesting best practice with this question. This is only an issue if the customer company is strictly national has a native language other than English, I think.

If the customer has a lot of mainly very domain specific (say, German) expressions, mixed with some lesser domain specific namings. The language of our code comments, class/method/variable names is English. Would you translate all domain specific names?

Best Answer

I'm working in Germany and I prefer to pick English.

Sometimes e.g. domain specific things like creating an module to "DATEV" (german invoice/billing software) I do use German names. Some German words cannot be translated properly, e.g. "Referenzbuchungsnummer" (ReferenceBookingNum?) or "Sachkontenlaenge" (..?). Also I do think that domain specific things would be ending in maintenance horror. Maybe you would remember that ReferenceBookingNum would relate to "Referenzbuchungsnummer", but what about your co-workers? They have to study internal documentation about naming, if documentation exists. They won't be very familiar with the module without having proper names. It's an unnecessary complexity if all other developer are German too. But "CakeFactory" sounds much better than "KeksFabrik" ;)

So it all depends.

Related Topic