views:

259

answers:

3

I'm looking at 1000s of code setting the CultureInfo for ToString and number conversions and date usages. The application is only used on one server, in one town, by one monolingual office and isn't going to move to another country ever.

I think these got there from following misplaced FxCop advice about internationalization.

Is there any reason to set the CultureInfo in this type of scenario? I'm I missiny any unusually reason for this?

UPDATE:
If there is a reason for this, new code should copy this convention of spamming the code with CultureInfo references.

+1  A: 

The old adage, never say never may be of use here.

If it's already been done, then leave it there, but obviously if it hasn't then a business case should be put together on whether it is worthwhile or not.

ck
+3  A: 

The YAGNI principle says "Always implement things when you actually need them, never when you just foresee that you need them."

In your case, you are not speculating about whether internationalization might be needed, but rather stating that it will not be needed. In this case don't worry about it, you have control over the settings on the server, so don't waste your time on it.

Patrick McDonald
+1  A: 

I've run into the same issue as you when using FxCop. I end up inundated with internationalization warnings. I only worried about setting the CultureInfo when dealing with data being input from the user, but I work for a German company in the US. We have some users who come temporarily to the US with machines setup for German dates, number formats, etc.

I wouldn't change anything at this point. If the app is ever moved or used internationally, I'm sure you'll be doing other work on it before it does. I would wait until then to worry about internationalization. Just my two cents...

Tim
But as a maintenance developer I feel a certain guilt about headaches I'm leaving for my successor.
MatthewMartin