Sublang Neutral

From WineHQ Wiki
Jump to: navigation, search

When to use SUBLANG_NEUTRAL in resources

Windows identifies the user's locale by two fields: the language id and the sublanguage id. Sometimes the differences between sublanguages are major - e.g. Chinese (Traditional) and Chinese (Simplified) use different alphabets - but often the sublanguage only identifies different countries where the same language is used.

In the latter case, the resource loader allows SUBLANG_NEUTRAL to be used to avoid duplicating the translation for different sublangs. In the most common case, when the application doesn't request a specific language, and the user and the system locale are equal (let's say they are LANG_FRENCH, SUBLANG_FRENCH_BELGIAN) the order of searching the language for a resource is as follows (see find_entry in dlls/ntdll/resource.c for the general case):

  5. Take the first language for that resource

Another generic define is SUBLANG_DEFAULT. It has a value of 1 and simply points to one of the sublangs - the one that Microsoft considers the default for that language.

On this page we have gathered information from translators about which languages should use SUBLANG_NEUTRAL and which should be translated into every sublanguage.

Note: the resources in dlls/kernel32/nls/*.nls are special and should always use the sublang code.

Languages for which SUBLANG_NEUTRAL should be used

If all the sublangs use the same language, you should use SUBLANG_NEUTRAL. Note that even when using SUBLANG_NEUTRAL, you can provide a more "specialized" translation of some or even all resources in a specific sublang.

The list of languages for which SUBLANG_NEUTRAL should be used:

  • Dutch (sublangs: Netherlands, Belgian, Surinam)
  • French (sublangs: France, Belgian, Canadian, Swiss, Luxembourg, Monaco)
  • German (sublangs: Germany, Swiss, Austrian, Luxembourg, Lichtenstein)
  • Italian (sublangs: Italy, Swiss)
  • Spanish (sublangs: Spain, Mexican, Modern, Guatemala, Costa Rica, Panama, Dominican Republic, Venezuela, Colombia, Peru, Argentina, Ecuador, Chile, Uruguay, Paraguay, Bolivia, El Salvador, Honduras, Nicaragua, Puerto Rico, US)
  • Swedish (sublangs: Sweden, Finland)

Languages where translations should use specific sublangs

If the sublangs differ because e.g. of the alphabet (like Chinese (Traditional) and Chinese (Simplified)) or because of different dialects (like Portuguese (Brazilian) and Portuguese (Portugal)) then the sublanguage code should be used.

The list of languages for which the sublanguage code should be used (SUBLANG_DEFAULT in italic):

  • Chinese (sublangs: Traditional, Simplified)
  • Norwegian (sublangs: Bokmål, Nynorsk)
  • Portuguese (sublangs: Brazilian, Portugal)

Languages with only one sublang

For these languages it doesn't matter if we use SUBLANG_NEUTRAL or SUBLANG_DEFAULT:

  • Bulgarian
  • Catalan
  • Czech
  • Danish
  • Esperanto
  • Finnish
  • Greek
  • Hebrew
  • Hungarian
  • Japanese
  • Korean
  • Polish
  • Romanian
  • Romansh
  • Russian
  • Thai
  • Turkish
  • Slovak
  • Slovenian
  • Ukrainian


English is a special case because English (US) is the fallback language (see point 4 of resource loading). That's why every resource should be available in an English (US) version. Some resources also have a SUBLANG_NEUTRAL version written with British English spellings. They will be used for all sublangs except for English (US).

See Also