vcl: namespace PDFWriterImpl consistently
[LibreOffice.git] / i18nlangtag / README
blobdcdb7be2314471d015ec193ed7de319ca349d79a
1 Code for language tags, LanguageTag wrapper for liblangtag and converter between BCP47 language tags, Locale(Language,Country,Variant) and MS-LangIDs.
3 Basic functionality used by almost every other module including comphelper, so even don't use that string helpers in this code to not create circular dependencies. Stick with sal and rtl!
7 If Microsoft introduced a new LCID for a locale that we previously defined as LANGUAGE_USER_..., for example LANGUAGE_CATALAN_VALENCIAN that we had as LANGUAGE_USER_CATALAN_VALENCIAN:
9 * include/i18nlangtag/lang.h
10 ** add the new LANGUAGE_... value as defined by MS, here LANGUAGE_CATALAN_VALENCIAN
11 ** rename the LANGUAGE_USER_... definition to LANGUAGE_OBSOLETE_USER_..., here LANGUAGE_USER_CATALAN_VALENCIAN to LANGUAGE_OBSOLETE_USER_CATALAN_VALENCIAN
12 ** add a  #define LANGUAGE_USER_CATALAN_VALENCIAN LANGUAGE_CATALAN_VALENCIAN
13 *** so svtools/source/misc/langtab.src (where the defined name is an identifier) and other places using LANGUAGE_USER_CATALAN_VALENCIAN do not need to be changed
15 * i18nlangtag/source/isolang/isolang.cxx
16 ** insert a mapping with LANGUAGE_CATALAN_VALENCIAN before (!) the existing LANGUAGE_USER_CATALAN_VALENCIAN
17 ** rename the LANGUAGE_USER_CATALAN_VALENCIAN to LANGUAGE_OBSOLETE_USER_CATALAN_VALENCIAN
18 *** so converting the tag maps to the new LANGUAGE_CATALAN_VALENCIAN and converting the old LANGUAGE_OBSOLETE_USER_CATALAN_VALENCIAN still maps to the tag.
20 * i18nlangtag/source/isolang/mslangid.cxx
21 ** add an entry to MsLangId::getReplacementForObsoleteLanguage() to convert LANGUAGE_OBSOLETE_USER_CATALAN_VALENCIAN to LANGUAGE_CATALAN_VALENCIAN
25 When changing a (translation's) language tag (for example, 'ca-XV' to 'ca-valencia' or 'sh' to 'sr-Latn'):
27 * solenv/inc/langlist.mk
28 ** replace the tag and sort alphabetically
30 * in translations/source do  git mv old-tag new-tag
31 ** note that translations is a git submodule so https://wiki.documentfoundation.org/Development/Submodules applies
33 * i18nlangtag/source/isolang/isolang.cxx
34 ** maintain the old tag's mapping entry in aImplIsoLangEntries to be able to read existing documents using that code
35 ** add the new tag's mapping to aImplBcp47CountryEntries or aImplIsoLangScriptEntries
36 ** change mnOverride from 0 to kSAME in aImplIsoLangScriptEntries or aImplIsoLangEntries
38 * i18nlangtag/source/languagetag/languagetag.cxx
39 ** add the new tag's fallback strings to the fallback of the old tag in LanguageTag::getFallbackStrings()
41 * i18nlangtag/qa/cppunit/test_languagetag.cxx
42 ** add a unit test for the new tag and old tag
44 * l10ntools/source/ulfconv/msi-encodinglist.txt
45 ** replace the tag and sort alphabetically
47 * setup_native/source/packinfo/spellchecker_selection.txt
48 ** replace the tag and sort alphabetically
50 If locale data exists:
52 * i18npool/source/localedata/data/*.xml     for example i18npool/source/localedata/data/sh_RS.xml 
53 ** in the <LC_INFO> element
54 *** change <LangID> to 'qlt'
55 *** after the <Country> element add a <Variant> element with the new full BCP 47 tag, for example 'sr-Latn-RS'
56 **** note that <Variant> has no <VariantID> or <DefaultName> child elements
57 ** if any of the other *.xml files reference the locale in a ref="..." attribute, change those too; note that these references use '_' underscore instead of '-' hyphen just like the file names do
58 ** rename sh_RS.xml to sr_Latn_RS.xml,  git mv sh_RS.xml sr_Latn_RS.xml
60 * i18npool/source/localedata/localedata.cxx
61 ** in aLibTable change the entry from old "sh_RS" to new "sr_Latn_RS", do not sort the table
63 * i18npool/Library_localedata_*.mk      for example i18npool/Library_localedata_euro.mk
64 ** change the entry for the changed .xml file, for example CustomTarget/i18npool/localedata/localedata_sh_RS to CustomTarget/i18npool/localedata/localedata_sr_Latn_RS, sort the list alphabetically
66 If dictionary exists:
68 * dictionaries/*/dictionaries.xcu       for example dictionaries/sr/dictionaries.xcu
69 ** change the affected <node oor:name="..."> elements to something corresponding, for example <node oor:name="HunSpellDic_sh" ...> to <node oor:name="HunSpellDic_sr_Latn" ...>
70 ** in the "Locales" properties change the <value> element, for example <value>sh-RS</value> to <value>sr-Latn-RS</value>
72 If dictionary is to be renamed, for example ku-TR to kmr-Latn:
74 * dictionaries/*/*                      for example dictionaries/ku_TR/*
75 ** if appropriate rename *.dic and *.aff files, for example ku_TR.dic to kmr_Latn.dic and ku_TR.aff to kmr_Latn.aff
76 * dictionaries/Dictionary_*.mk          for example dictionaries/Dictionary_ku_TR.mk
77 ** rename file, for example to Dictionary_kmr_Latn.mk
78 ** change all locale dependent file names and target, for example *ku_TR* to *kmr_Latn* AND ku-TR to kmr-Latn; note '-' and '_' separators, both are used!
79 * dictionaries/Module_dictionaries.mk
80 ** change Dictionary_* (Dictionary_ku-TR to Dictionary_kmr-Latn) and sort alphabetically
81 * scp2/source/ooo/common_brand.scp
82 ** DosName = "dict-ku-TR";
83 *** change to "dict-kmr-Latn"
84 * scp2/source/ooo/file_ooo.scp
85 ** File gid_File_Extension_Dictionary_Ku_Tr
86 *** change to gid_File_Extension_Dictionary_Kmr_Latn
87 ** Name = "Dictionary/dict-ku-TR.filelist";
88 *** change to "Dictionary/dict-kmr-Latn.filelist"
89 * scp2/source/ooo/module_ooo.scp
90 ** Module gid_Module_Root_Extension_Dictionary_Ku_Tr
91 *** change to gid_Module_Root_Extension_Dictionary_Kmr_Latn
92 ** MOD_NAME_DESC ( MODULE_EXTENSION_DICTIONARY_KU_TR );
93 *** change to MODULE_EXTENSION_DICTIONARY_KMR_LATN
94 ** Files = (gid_File_Extension_Dictionary_Ku_Tr);
95 *** change to gid_File_Extension_Dictionary_Kmr_Latn
96 ** Spellcheckerlanguage = "ku-TR";
97 *** change to "kmr-Latn"
98 * scp2/source/ooo/module_ooo.ulf
99 ** [STR_NAME_MODULE_EXTENSION_DICTIONARY_KU_TR]
100 *** change to STR_NAME_MODULE_EXTENSION_DICTIONARY_KMR_LATN
101 ** en-US = "Kurdish (Turkey)"
102 *** change to "Kurdish, Northern, Latin script"
103 ** [STR_DESC_MODULE_EXTENSION_DICTIONARY_KU_TR]
104 *** change to STR_DESC_MODULE_EXTENSION_DICTIONARY_KMR_LATN
105 ** en-US = "Kurdish (Turkey) spelling dictionary"
106 *** change to "Kurdish, Northern, Latin script spelling dictionary"
107 * setup_native/source/packinfo/packinfo_office.txt
108 ** module = "gid_Module_Root_Extension_Dictionary_Ku_Tr"
109 *** change to "gid_Module_Root_Extension_Dictionary_Kmr_Latn"
110 ** solarispackagename = "%PACKAGEPREFIX%WITHOUTDOTUNIXPRODUCTNAME%BRANDPACKAGEVERSION-dict-ku-TR"
111 *** change to "...-dict-kmr-Latn"
112 ** packagename = "%UNIXPRODUCTNAME%BRANDPACKAGEVERSION-dict-ku-TR"
113 *** change to "...-dict-kmr-Latn"
114 ** description = "Ku-TR dictionary for %PRODUCTNAME %PRODUCTVERSION"
115 *** change to "Kmr-Latn dictionary ..."
117 If extras exist, for example extras/source/autotext/*:
119 * extras/Package_autocorr.mk
120 ** replace acor_* entry, for example acor_sh-RS.dat to acor_sr-Latn-RS.dat, sort alphabetically
122 * extras/CustomTarget_autocorr.mk
123 ** in extras_AUTOCORR_LANGS change map entry, for example sh-RS:sh-RS to sr-Latn-RS:sr-Latn-Rs
124 ** in extras_AUTOCORR_XMLFILES change directory entries, for example sh-RS/acor/DocumentList.xml to sr-Latn-RS/acor/DocumentList.xml
126 * rename files accordingly, for example in extras/source/autotext/lang/  git mv sh-RS sr-Latn-RS
128 If helpcontent exists:
130 * helpcontent2/source/auxiliary/*/*       for example helpcontent2/source/auxiliary/sh/*
131 ** change Language=..., for example Language=sh to Language=sr-Latn in helpcontent2/source/auxiliary/sh/*.cfg
132 ** rename helpcontent2/source/auxiliary/sh/  git mv sh sr-Latn
134 For language packs:
136 * scp2/source/ooo/module_langpack.ulf
137 * scp2/source/accessories/module_templates_accessories.ulf
138 * scp2/source/accessories/module_samples_accessories.ulf
139 * scp2/source/extensions/module_extensions_sun_templates.ulf
141 ** If the upper-cased tag appears in any of these, replace it, for example STR_NAME_MODULE_LANGPACK_SH to STR_NAME_MODULE_LANGPACK_SR_LATN