Update Adding new language spellchecking support instruction

This commit is contained in:
Svetlana Maleeva 2022-10-06 18:15:03 +03:00
parent 3b1d587631
commit 8442c5fc3a
2 changed files with 18 additions and 4 deletions

View File

@ -41,14 +41,21 @@
<h5>Adding new language spellchecking support</h5>
<p><b>ONLYOFFICE Docs</b> uses <a target="_blank" href="http://hunspell.sourceforge.net/">Hunspell</a> compatible format spellchecking service. This allows to easily increase the number of supported languages, which is limited by default. To add a language you will need the following:</p>
<ol>
<li>Put the language both affix (<code>.aff</code>) and dictionary (<code>.dic</code>) files in the Hunspell format to the <code>C:\Program Files (x86)\Ascensio System SIA\ONLYOFFICE Online Editors\SpellCheckerService\SpellChecker\Dictionaries\[lanugage_name]</code> folder.
<li>Put the language both affix (<code>.aff</code>) and dictionary (<code>.dic</code>) files in the Hunspell format to the <code>C:\Program Files\ONLYOFFICE\DocumentServer\dictionaries\[lanugage_name]</code> folder.
<br />
<br />
<em class="example">For Spanish it will be <b>es_ES</b> folder:
<br />C:\Program Files (x86)\Ascensio System SIA\ONLYOFFICE Online Editors\SpellCheckerService\SpellChecker\Dictionaries\es_ES
<br />C:\Program Files\ONLYOFFICE\DocumentServer\dictionaries\es_ES
</em>
<br />
</li>
<li>Open the <code>C:\Program Files\ONLYOFFICE\DocumentServer\sdkjs\common\spell\spell\spell.js</code> file, find the <code>this.languages = {};</code> string and add the LCID (Locale ID) of the language and the folder name (see the example below). The list of LCIDs can be found <a target="_blank" href="https://learn.microsoft.com/en-us/openspecs/office_standards/ms-oe376/6c085406-a698-4e12-9d4d-c3b0ee3dbc4a">here</a>.
<pre><code>this.languages = {
"2115" : "uz_Cyrl_UZ",
"1091" : "uz_Latn_UZ"
};
</code></pre>
</li>
</ol>
<h2 id="HelpfulHints">Helpful Hints</h2>
<p><b>ONLYOFFICE Docs</b> always has a certain set of fonts with it. When installed it will check the presence of the following font files in the system: <code>arial.ttf</code>, <code>calibri.ttf</code>, <code>cour.ttf</code>, <code>symbol.ttf</code>, <code>times.ttf</code>, <code>wingding.ttf</code>.</p>

View File

@ -41,14 +41,21 @@
<h5>Добавление поддержки нового языка проверки орфографии</h5>
<p>В <b>ONLYOFFICE Docs</b> используется сервис проверки орфографии, совместимый с форматом <a target="_blank" href="http://hunspell.sourceforge.net/">Hunspell</a>. Это позволяет легко увеличить количество поддерживаемых языков, по умолчанию ограниченное. Для добавления языка надо сделать следующее:</p>
<ol>
<li>Положите языковые файлы аффиксов (<code>.aff</code>) и словаря (<code>.dic</code>) в формате Hunspell в папку <code>C:\Program Files (x86)\Ascensio System SIA\ONLYOFFICE Online Editors\SpellCheckerService\SpellChecker\Dictionaries\[language_name]</code>.
<li>Положите языковые файлы аффиксов (<code>.aff</code>) и словаря (<code>.dic</code>) в формате Hunspell в папку <code>C:\Program Files\ONLYOFFICE\DocumentServer\dictionaries\[language_name]</code>.
<br />
<br />
<em class="example">Для испанского языка это будет папка <b>es_ES</b>:
<br />C:\Program Files (x86)\Ascensio System SIA\ONLYOFFICE Online Editors\SpellCheckerService\SpellChecker\Dictionaries\es_ES
<br />C:\Program Files\ONLYOFFICE\DocumentServer\dictionaries\es_ES
</em>
<br />
</li>
<li>Откройте файл <code>C:\Program Files\ONLYOFFICE\DocumentServer\sdkjs\common\spell\spell\spell.js</code>, найдите строку <code>this.languages = {};</code> и добавьте LCID (Locale ID) языка и название папки (см. пример ниже). Список LCID можно найти <a target="_blank" href="https://learn.microsoft.com/en-us/openspecs/office_standards/ms-oe376/6c085406-a698-4e12-9d4d-c3b0ee3dbc4a">здесь</a>.
<pre><code>this.languages = {
"2115" : "uz_Cyrl_UZ",
"1091" : "uz_Latn_UZ"
};
</code></pre>
</li>
</ol>
<h2 id="HelpfulHints">Полезные подсказки</h2>
<p>В <b>ONLYOFFICE Docs</b> всегда есть определенный набор шрифтов. После установки <b>ONLYOFFICE Docs</b> выполняется проверка наличия в системе следующих файлов шрифтов: <code>arial.ttf</code>, <code>calibri.ttf</code>, <code>cour.ttf</code>, <code>symbol.ttf</code>, <code>times.ttf</code>, <code>wingding.ttf</code>.</p>