Difference between revisions of "Sublang"

From ReactOS Wiki
Jump to: navigation, search
(Add an exception for chinese, hope this is correct)
m
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
{{Main|Translation Introduction}}
 +
 
== General Rules ==
 
== General Rules ==
* If the primary language has only one sublanguage, use SUBLANG_DEFAULT.
+
* If the primary language has only one sublanguage, use <code>SUBLANG_DEFAULT</code> or <code>SUBLANG_NEUTRAL</code>.<br />We highly recommend using <code>SUBLANG_DEFAULT</code> here, but to retain compatibility with the [http://wiki.winehq.org/SublangNeutral Wine Sublang Rules] we also allow using <code>SUBLANG_NEUTRAL</code>. This means that you also shouldn't change <code>SUBLANG_NEUTRAL</code> to <code>SUBLANG_DEFAULT</code> in a component we share with Wine.
* If the primary language has more than one sublanguage and we have no general translation for this primary language yet, use SUBLANG_NEUTRAL for the general translation.
+
* If the primary language has more than one sublanguage and we have no general translation for this primary language yet, use <code>SUBLANG_NEUTRAL</code> for the general translation.
 
* If the primary language has more than one sublanguage, we already have a general translation for this primary language and you want to add a translation specifically for this sublanguage, use SUBLANG_SubLanguageName for this specific translation.
 
* If the primary language has more than one sublanguage, we already have a general translation for this primary language and you want to add a translation specifically for this sublanguage, use SUBLANG_SubLanguageName for this specific translation.
  
 
== Exceptions of these Rules ==
 
== Exceptions of these Rules ==
* If the primary language is LANG_ENGLISH and you want to add a general english translation, you have to use SUBLANG_ENGLISH_US.<br>Every file, which contains translations, should have a LANG_ENGLISH, SUBLANG_ENGLISH_US translation as this is also used as a fallback.
+
* If the primary language is <code>LANG_ENGLISH</code> and you want to add a general english translation, you have to use <code>SUBLANG_ENGLISH_US</code>.<br />Every file, which contains translations, should have a <code>LANG_ENGLISH</code>, <code>SUBLANG_ENGLISH_US</code> translation as this is also used as a fallback.
* For LANG_IRISH, you cannot use SUBLANG_DEFAULT. In this case, you have to use SUBLANG_IRISH_IRELAND.
+
* For <code>LANG_IRISH</code>, you cannot use <code>SUBLANG_DEFAULT</code>. In this case, you have to use <code>SUBLANG_IRISH_IRELAND</code>.
* If you want to add a chinese translation, decide on either SUBLANG_CHINESE_SIMPLIFIED or SUBLANG_CHINESE_TRADITIONAL.<br>As both languages differ very much in the used alphabet, we should set no default or neutral language here.
+
* If you want to add a chinese translation, decide on either <code>SUBLANG_CHINESE_SIMPLIFIED</code> or <code>SUBLANG_CHINESE_TRADITIONAL</code>.<br />As both languages differ very much in the used alphabet, we should set no default or neutral language here.
  
 
== Web Links ==
 
== Web Links ==
 +
 
* [http://msdn2.microsoft.com/en-us/library/ms776294.aspx MSDN: Language Identifier Constants and Strings]
 
* [http://msdn2.microsoft.com/en-us/library/ms776294.aspx MSDN: Language Identifier Constants and Strings]
 
* [http://support.microsoft.com/kb/169483/en-us Resource Language Loading Order]
 
* [http://support.microsoft.com/kb/169483/en-us Resource Language Loading Order]
 +
 +
[[Category:Documentation]]

Latest revision as of 15:37, 15 May 2014

Main article: Translation Introduction

General Rules

  • If the primary language has only one sublanguage, use SUBLANG_DEFAULT or SUBLANG_NEUTRAL.
    We highly recommend using SUBLANG_DEFAULT here, but to retain compatibility with the Wine Sublang Rules we also allow using SUBLANG_NEUTRAL. This means that you also shouldn't change SUBLANG_NEUTRAL to SUBLANG_DEFAULT in a component we share with Wine.
  • If the primary language has more than one sublanguage and we have no general translation for this primary language yet, use SUBLANG_NEUTRAL for the general translation.
  • If the primary language has more than one sublanguage, we already have a general translation for this primary language and you want to add a translation specifically for this sublanguage, use SUBLANG_SubLanguageName for this specific translation.

Exceptions of these Rules

  • If the primary language is LANG_ENGLISH and you want to add a general english translation, you have to use SUBLANG_ENGLISH_US.
    Every file, which contains translations, should have a LANG_ENGLISH, SUBLANG_ENGLISH_US translation as this is also used as a fallback.
  • For LANG_IRISH, you cannot use SUBLANG_DEFAULT. In this case, you have to use SUBLANG_IRISH_IRELAND.
  • If you want to add a chinese translation, decide on either SUBLANG_CHINESE_SIMPLIFIED or SUBLANG_CHINESE_TRADITIONAL.
    As both languages differ very much in the used alphabet, we should set no default or neutral language here.

Web Links