helpcenter/Web/Controls/Help/Server/Docker/Document/AddInterfaceLanguage/AddInterfaceLanguage.ascx

113 lines
10 KiB
Plaintext
Raw Normal View History

<%@ Control Language="C#" Inherits="BaseContentUserControls"%>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<script runat="server">
protected override void Init()
{
2020-09-22 07:02:59 +00:00
PageTitle = PageCaption = "Adding a new interface language to ONLYOFFICE Docs";
MetaKeyWords = "";
MetaDescription = "";
}
</script>
<div class="MainHelpCenter">
2020-09-22 07:02:59 +00:00
<h1 class="subHeaderFeaturesCaption Guides_Video_Captions">Adding a new interface language to ONLYOFFICE Docs</h1>
<span class="doconly_display"><cc:localizecontent runat="Server" controlname="~/Controls/Help/VariousControls/Versions/DocumentServer/DocumentServerDocker_Current.ascx" /></span>
<span class="linonly_display"><cc:localizecontent runat="Server" controlname="~/Controls/Help/VariousControls/Versions/DocumentServer/DocumentServer_Current.ascx" /></span>
<div class="keyword_block">
<ul>
<li><cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/Tags/local-server/local-server.ascx" /></li>
<li><cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/Tags/server-version/server-version.ascx" /></li>
<li><cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/Tags/document-server/document-server.ascx" /></li>
<li class="doconly_display"><cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/Tags/docker-version/docker-version.ascx" /></li>
<li class="linonly_display"><cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/Tags/linux-version/linux-version.ascx" /></li>
</ul>
</div>
<div class="video_ground video_trips">
<h2 id="introduction">Introduction</h2>
<div class="block_of_step">
<div class="screen_text">
2020-09-22 07:02:59 +00:00
<p><b>ONLYOFFICE Docs</b> interface is available in many languages, but it might happen that your language is absent from the list of the available ones. If it is so and you have a possibility to participate in the translation of <b>ONLYOFFICE Docs</b> interface into your own language, you will need to check if everything is translated correctly and all the words and phrases fit where they belong.</p>
<p>This article will explain how this can be done.</p>
</div>
</div>
</div>
<h2 id="ParticipateTranslation">Participating in translation</h2>
<div class="block_of_step">
<div class="screen_text">
<p>There are two ways to take part in the translation process:</p>
<ul>
2020-09-22 07:02:59 +00:00
<li>Translate <b>ONLYOFFICE Docs</b> (together with <b>ONLYOFFICE Groups</b> and <b>ONLYOFFICE Mail</b>, if needed) using our <a href="<%=VirtualPathUtility.ToAbsolute("~/guides/become-translator.aspx")%>">Translation system</a>. The process is quite easy. Once the translation is over, the language files for the interface translation will be included into the nearest release. We can also send them for you to check. If you would like to participate, feel free to contact us via the <a href="mailto:documentation@onlyoffice.com">documentation@onlyoffice.com</a> email address.</li>
<li>Or you can use our <a target="_blank" href="https://github.com/ONLYOFFICE/web-apps-pro/">GitHub repository</a> to get the language files and translate them using the means you are used to. The files are located by the following paths:
<p><b>Document Editor</b></p>
<ul>
<li><a target="_blank" href="https://github.com/ONLYOFFICE/web-apps-pro/tree/master/apps/documenteditor/main/locale">https://github.com/ONLYOFFICE/web-apps-pro/tree/master/apps/documenteditor/main/locale</a></li>
<li><a target="_blank" href="https://github.com/ONLYOFFICE/web-apps-pro/tree/master/apps/documenteditor/mobile/locale">https://github.com/ONLYOFFICE/web-apps-pro/tree/master/apps/documenteditor/mobile/locale</a></li>
</ul>
<p><b>Presentation Editor</b></p>
<ul>
<li><a target="_blank" href="https://github.com/ONLYOFFICE/web-apps-pro/tree/master/apps/presentationeditor/main/locale">https://github.com/ONLYOFFICE/web-apps-pro/tree/master/apps/presentationeditor/main/locale</a></li>
<li><a target="_blank" href="https://github.com/ONLYOFFICE/web-apps-pro/tree/master/apps/presentationeditor/mobile/locale">https://github.com/ONLYOFFICE/web-apps-pro/tree/master/apps/presentationeditor/mobile/locale</a></li>
</ul>
<p><b>Spreadsheet Editor</b></p>
<ul>
<li><a target="_blank" href="https://github.com/ONLYOFFICE/web-apps-pro/tree/master/apps/spreadsheeteditor/main/locale">https://github.com/ONLYOFFICE/web-apps-pro/tree/master/apps/spreadsheeteditor/main/locale</a></li>
<li><a target="_blank" href="https://github.com/ONLYOFFICE/web-apps-pro/tree/master/apps/spreadsheeteditor/mobile/locale">https://github.com/ONLYOFFICE/web-apps-pro/tree/master/apps/spreadsheeteditor/mobile/locale</a></li>
</ul>
<p>There are <code>JSON</code> files for each of the supported language. You can either correct the files already there or add your own language file with the two-letter language locale code.</p>
</li>
</ul>
</div>
</div>
<h2 id="CheckingTranslation">Checking translated files</h2>
<div class="block_of_step">
<div class="screen_text">
2020-09-22 07:02:59 +00:00
<p>Install <b>ONLYOFFICE Docs</b> on your own computer. The instruction on how this can be done is available <a class="doconly_display" href="<%=VirtualPathUtility.ToAbsolute("~/server/docker/document/docker-installation.aspx")%>">here</a><span class="linonly_display"><a href="<%=VirtualPathUtility.ToAbsolute("~/server/linux/document/linux-installation.aspx")%>">here for Ubuntu and derivatives</a> or <a href="<%=VirtualPathUtility.ToAbsolute("~/server/linux/document/linux-installation-centos.aspx")%>">here for RPM-based distros</a></span>.
<p>If you use our translation system, you will need to contact us using the <a href="mailto:documentation@onlyoffice.com">documentation@onlyoffice.com</a> email address, so that we could send you the translated files.</p>
<p>Once you have the interface language <code>JSON</code> files, put them using the following paths:</p>
<p><b>Document Editor</b></p>
<ul>
<li><span class="param-type">documentserver/web-apps/apps/documenteditor/main/locale</span></li>
<li><span class="param-type">documentserver/web-apps/apps/documenteditor/mobile/locale</span></li>
</ul>
<p><b>Presentation Editor</b></p>
<ul>
<li><span class="param-type">documentserver/web-apps/apps/presentationeditor/main/locale</span></li>
<li><span class="param-type">documentserver/web-apps/apps/presentationeditor/mobile/locale</span></li>
</ul>
<p><b>Spreadsheet Editor</b></p>
<ul>
<li><span class="param-type">documentserver/web-apps/apps/spreadsheeteditor/main/locale</span></li>
<li><span class="param-type">documentserver/web-apps/apps/spreadsheeteditor/mobile/locale</span></li>
</ul>
2020-09-22 07:02:59 +00:00
<p>Where <b>documentserver</b> is the folder with the <b>ONLYOFFICE Docs</b> installed.</p>
<div class="notehelp doconly_display">Do not forget to enter the Docker container to look for the <b>ONLYOFFICE Docs</b> files and folders.</div>
<p>After that open any document adding the <code>?lang=your_lang_code</code> as the parameter to the document link.</p>
<div class="example">To open the editors with the Bulgarian language interface, you will need to set this parameter as follows:
<pre><code>?lang=bg</code></pre>
</div>
<p>If everything is done right, you will see the interface of the editors change to your language with your translations.</p>
</div>
</div>
<h2 id="UpdateTranslation">Updating translated files</h2>
<div class="block_of_step">
<div class="screen_text">
2020-09-22 07:02:59 +00:00
<p>After you check the translation (or after the <b>ONLYOFFICE Docs</b> updates) you might need to correct the files and upload them once again to the server instance. The files are cached for faster performance and you (and other <b>ONLYOFFICE Docs</b> users) will not see the changes until the server cache is cleared.</p>
<p>This is done the following way:</p>
<div class="notehelp doconly_display">All the actions must be performed <b>within</b> the Docker container.</div>
<ol>
<li>Find the <code>/etc/nginx/includes/ds-docservice.conf</code> and <code>/etc/nginx/includes/ds-spellchecker.conf</code> files.</li>
<li>The files must contain the build date and time values. Change these values to some other (any value will do, but the main thing that it <b>must be the same</b> in all the places).
<div class="notehelp">Please note that you need to find and replace <b>all</b> the instances of the date and time values in the above files. See the samples of <a target="_blank" href="https://github.com/ONLYOFFICE/document-server-package/blob/master/common/documentserver/nginx/includes/ds-docservice.conf.m4">ds-docservice.conf</a> and <a target="_blank" href="https://github.com/ONLYOFFICE/document-server-package/blob/master/common/documentserver/nginx/includes/ds-spellchecker.conf.m4">ds-spellchecker.conf</a> files in our GitHub repository. All the instances of the <code>{{DATE}}</code> variable there correspond to the date and time values which <b>must</b> be replaced.</div>
</li>
<li>Restart <b>NGINX</b>:
<pre><code>sudo service nginx reload</code></pre>
</li>
</ol>
<p>After that the cache should be reset for all the server users and the interface translations will be updated.</p>
</div>
</div>
</div>