This thread has alredy been answered but I came across a unique finding for CreateSpecificCulture API which might not be so obvious at times. So I considered this thread to be an apt place for my findings. I spent a few days on this so just thought of sharing my experience if it can save few hours or days for others as well.
While using the API when you pass it only the culture name like pt
(for portuguese) or de
(for German) this API returns a specific culture corresponding to the locale which is termed as default locale for that culture. Now this locale might not be so obvious as it sounds where I got stuck. For German, de-DE
looks obvious which is German spoken in Germany. For Italian, it-IT
looks obvious which is Italian spoken in Italy.
Likewise pt-PT
looks obvious for Portuguese spoken in Portugal. Unfortunately this is not the case. Based on not sure what exact reason (may be population, country of origin, national language etc.) there is a global standardization based on which the default locale for a given culture is decided when you try to create a specific culture from a culture id (pt
in this case). Microsoft has documented the entire list at following link :
http://msdn.microsoft.com/en-us/goglobal/bb896001.aspx
If you want to know which is the default country locale for a given culture or language just match the last column (Language Name Abbreviation) code in the above link.
For portuguese, the language name abbrevitaion of invariant culture "Portuguese" matches with "Portuguese (Brazil)" which is PTB. Portuguese(Portugal) has a different code PTG
. So in this case Portuguese (Brazil) is the default locale for portuguese language.
If your application logic or requirements are in any way relying on this behavior of this API you got to be cautious. This behavior becomes more important in web based applications as all browsers in the market also follow these guidelines and send appropriate information in the http request header when you are looking at a localised version of a multi lingual website.
I'm still looking for the reason though which is THE factor behind setting a specific country as default locale for any culture which doesn't sound so obvious in case of Portuguese. Any information or comments are welcome.