3

Recently I decided to add some translations to my program. I wonder how I should name the language files?

  1. in the culture's name of the language (example: english = en, french = fr, italian = it, etc...)

  2. in the name of the language [in english] (example: english = english, french = french, italian = italian, etc..)

I know you'll choose the second way because you dont have to detect which filename it is because both have the same name. But the problem is this - I show the name of the languages in its langauge (example: english = english, french = française, italian = italiano, etc..) so I still need to detect which filename it is.

The main question is which way I should choose? the name of the language in english or the culture name? and why?...

Thanks!

1 Answer 1

10

I would use the language code, for instance: US english (en-us) and so on.

http://en.wikipedia.org/wiki/Language_code

That way you can get the country and the language.

http://msdn.microsoft.com/en-us/library/ms533052(v=vs.85).aspx

Have you considered this option?

7
  • 1
    +1 for using ISO standards Commented Feb 24, 2011 at 18:52
  • Alright. I will use you way. I just got one question related to you answer, I found all the specific culture names for my languages except for one > Haitian Creole. I cant find the specific or neutral culture name of it.. do you know what's the culture of it?
    – Ron
    Commented Feb 24, 2011 at 20:00
  • @Ron are you wearing your hat? :D okok that was lame... the language code is hat sil.org/iso639-3/documentation.asp?id=hat Regards
    – eestein
    Commented Feb 24, 2011 at 20:40
  • @eestein, indeed it was lame, but still I laughed. anyway this is the netural identifier / global identifier. I need specific culture name (for C#)...
    – Ron
    Commented Feb 24, 2011 at 21:26
  • 1
    @Ron Ok, well... it seems you'll have to create your own. Check this link(the answer): stackoverflow.com/questions/3390119/… this is the right way to do it. Hope it helps. Best regards.
    – eestein
    Commented Feb 24, 2011 at 21:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.