Skip to content
Snippets Groups Projects
Commit e9cb6ce6 authored by catch's avatar catch
Browse files

Issue #3095737 by jhodgdon, snehalgaikwad, anmolgoyal74, daffie, DeepaliJ,...

Issue #3095737 by jhodgdon, snehalgaikwad, anmolgoyal74, daffie, DeepaliJ, naresh_bavaskar, Amber Himes Matz, catch: Convert internationalization modules: config_translation, content_translation, locale, language module hook_help() to topic(s)
parent 88272aea
No related branches found
No related tags found
6 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!1012Issue #3226887: Hreflang on non-canonical content pages,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10,!596Issue #3046532: deleting an entity reference field, used in a contextual view, makes the whole site unrecoverable,!496Issue #2463967: Use .user.ini file for PHP settings,!16Draft: Resolve #2081585 "History storage"
---
label: 'Translating configuration'
related:
- core.config_overview
- core.translations
- language.add
---
{% set config_translation = render_var(url('config_translation.mapper_list'))%}
{% set config_overview = render_var(url('help.help_topic', {'id': 'core.config_overview'})) %}
{% set language_add = render_var(url('help.help_topic', {'id': 'language.add'})) %}
<h2>{% trans %}Goal{% endtrans %}</h2>
<p>{% trans %}Translate your site configuration to another language. See <a href="{{ language_add }}">Adding a language</a> if you need to add a new language.{% endtrans %}</p>
<h2>{% trans %}Steps{% endtrans %}</h2>
<ol>
<li>{% trans %}In the <em>Manage</em> administrative menu, navigate to <em>Configuration</em> &gt; <em>Regional and language</em> &gt; <a href="{{ config_translation }}"><em>Configuration translation</em></a>.{% endtrans %}</li>
<li>{% trans %}Find either the configuration entity type or the simple configuration item that you want to translate in the <em>Label</em> column of the list. Click <em>List</em> under <em>Operations</em> for a configuration entity, or <em>Translate</em> for simple configuration. (See <a href="{{ config_overview }}">Managing and deploying configuration</a> to learn more about types of configuration and configuration entities.){% endtrans %}</li>
<li>{% trans %}For configuration entities, find the specific entity that you want to translate on the next page, and click <em>Translate</em> under <em>Operations</em>.{% endtrans %}</li>
<li>{% trans %}Enter translations for the translatable text fields for the configuration item, and save.{% endtrans %}</li>
</ol>
---
label: 'Configuring content language settings and translation'
related:
- core.translations
- language.add
---
{% set translation_settings = render_var(url('language.content_settings_page')) %}
{% set entity_overview = render_var(url('help.help_topic', {'id': 'core.content_structure'})) %}
<h2>{% trans %}Goal{% endtrans %}</h2>
<p>{% trans %}Configure language and translation settings for one or more content entity types (see <a href="{{ entity_overview }}">Managing content structure</a> for an overview of content entities). To do this, you must have at least two languages configured. Afterwards, you will have a <em>Translate</em> operation available for your content entities, either as a tab or link when you are viewing or editing content, or on content administration pages.{% endtrans %}</p>
<h2>{% trans %}Steps{% endtrans %}</h2>
<ol>
<li>{% trans %}In the <em>Manage</em> administrative menu, navigate to <em>Configuration</em> &gt; <em>Regional and language</em> &gt; <a href="{{ translation_settings }}"><em>Content language and translation</em></a>.{% endtrans %}</li>
<li>{% trans %}Under <em>Custom language settings</em>, find the content entity types that should have customized language settings on your site. Check the box next to each one. A section will appear below the list with settings for that entity type.{% endtrans %}</li>
<li>{% trans %}For each entity type you checked, in the settings section below check the boxes for each entity sub-type that should be <em>Translatable</em> on your site. If the entity type does not have sub-types, there is just one check box for the entity type as a whole.{% endtrans %}</li>
<li>{% trans %}For each entity type or subtype, select the <em>Default language</em>. Also, if you want to have languages other than the default available when you create content, check <em>Show language selector on create and edit pages</em>.{% endtrans %}</li>
<li>{% trans %}For each <em>Translatable</em> type or sub-type, look through the list of fields for the type or sub-type, and verify that only the fields that should be translatable are checked. For example, you would probably want to translate a <em>Title</em> field, but you might not want to translate a <em>Start date</em> field.{% endtrans %}</li>
<li>{% trans %}Click <em>Save configuration</em> when all of your changes are complete.{% endtrans %}</li>
</ol>
---
label: 'Working with languages and translations'
top_level: true
related:
- block.place
- block.configure
---
{% set config_overview = render_var(url('help.help_topic', {'id': 'core.config_overview'})) %}
{% set content_structure = render_var(url('help.help_topic', {'id': 'core.content_structure'})) %}
<h2>{% trans %}What text can be translated in your site?{% endtrans %}</h2>
<p>{% trans %}There are three types of text that can be translated:{% endtrans %}</p>
<ul>
<li>{% trans %}Content (blocks, content items, etc.) can be written in English or another language, and can be translated into additional languages. See <a href="{{ content_structure }}">Managing content structure</a> to learn more about content.{% endtrans %}</li>
<li>{% trans %}Many configuration items also include text that can be translated. Default configuration provided by your site's software is provided in English; you can also download community-provided translations. See <a href="{{ config_overview }}">Managing and deploying configuration</a> to learn more about configuration.{% endtrans %}</li>
<li>{% trans %}User interface text that is provided by the core software, your install profile, themes, and modules is provided in English, but can be translated into other languages. You can also download translations that community-members have provided.{% endtrans %}</li>
</ul>
<h2>{% trans %}Working with languages overview{% endtrans %}</h2>
<p>{% trans %}The core Language module lets you add new languages to your site, provides the <em>Language switcher</em> block, and provides the ability to configure block visibility by language; the block and block visibility settings are only available if you have multiple languages configured. The core Content Translation, Configuration Translation, and Interface Translation modules let you translate content, configuration, and the built-in user interface, respectively. The core Update Manager module manages automatic downloads of community-provided translations of default configuration and user-interface text. See the related topics listed below for specific tasks.{% endtrans %}</p>
---
label: 'Adding a language'
related:
- core.translations
- language.detect
---
{% set languages_url = render_var(url('entity.configurable_language.collection')) %}
<h2>{% trans %}Goal{% endtrans %}</h2>
<p>{% trans %}Add a language to your site.{% endtrans %}</p>
<h2>{% trans %}Steps{% endtrans %}</h2>
<ol>
<li>{% trans %}In the <em>Manage</em> administrative menu, navigate to <em>Configuration</em> &gt; <em>Regional and language</em> &gt; <a href="{{ languages_url }}"><em>Languages</em></a>.{% endtrans %}</li>
<li>{% trans %}Click <em>Add language</em>.{% endtrans %}</li>
<li>{% trans %}If your language is in the <em>Language name</em> list, select it and click <em>Add language</em>.{% endtrans %}</li>
<li>{% trans %}If your language is not in the list, select <em>Custom language...</em> and enter the <em>Language code</em>, <em>Language name</em>, and <em>Direction</em> for the language. Click <em>Add custom language</em>.{% endtrans %}</li>
<li>{% trans %}Wait for the translation system to be updated. Also, if you have the core Update Manager module installed and translations are available for your language, wait for translations to be downloaded. You should be returned to the <em>Languages</em> page when this completes.{% endtrans %}</li>
</ol>
---
label: 'Configuring language detection and selection'
related:
- core.translations
- language.add
---
{% set detection = render_var(url('language.negotiation')) %}
<h2>{% trans %}Goal{% endtrans %}</h2>
<p>{% trans %}Configure the methods used to decide which language will be used to display text on your site.{% endtrans %}</p>
<h2>{% trans %}What is a language detection method?{% endtrans %}</h2>
<p>{% trans %}A language detection method is a way for your site to decide what language should be used to display text. This decision is made by evaluating a series of detection methods for languages; the first detection method that gets a result will determine which language is used. If you have more than one language on your site, you can configure the detection methods that are used and the order they are evaluated, for both user interface text and content text. Configuration text always uses the interface text method, and most sites use the same detection methods for all types of text.{% endtrans %}</p>
<h2>{% trans %}What language detection methods are available?{% endtrans %}</h2>
<p>{% trans %}The available detection methods depend on what modules you have installed. Some of the most commonly-used language detection methods are:{% endtrans %}</p>
<dl>
<dt>{% trans %}URL{% endtrans %}</dt>
<dd>{% trans %}Use the language from the URL, which can either be in a path prefix like <em>example.com/fr/page_path</em> for French (fr) language, or in a domain like <em>fr.example.com/page_path</em>.{% endtrans %}</dd>
<dt>{% trans %}User{% endtrans %}</dt>
<dd>{% trans %}For logged in users, use the language they have set in their profiles.{% endtrans %}</dd>
<dt>{% trans %}Browser{% endtrans %}</dt>
<dd>{% trans %}Use the language preferences from the user's browser.{% endtrans %}</dd>
<dt>{% trans %}Selected language{% endtrans %}</dt>
<dd>{% trans %}Use the language most recently selected from a <em>Language switcher</em> block.{% endtrans %}</dd>
<dt>{% trans %}Session{% endtrans %}</dt>
<dd>{% trans %}Use the language from a session parameter or a request parameter; for example, adding <em>?language=fr</em> to the end of the URL.{% endtrans %}</dd>
</dl>
<h2>{% trans %}Steps{% endtrans %}</h2>
<ol>
<li>{% trans %}In the <em>Manage</em> administrative menu, navigate to <em>Configuration</em> &gt; <em>Regional and language</em> &gt; <em>Languages</em> &gt; <a href="{{ detection }}"><em>Detection and selection</em></a>.{% endtrans %}</li>
<li>{% trans %}Check the boxes to enable the desired language detection methods, and uncheck boxes for the methods you do not want to use.{% endtrans %}</li>
<li>{% trans %}Drag the methods to change their order, if desired.{% endtrans %}</li>
<li>{% trans %}Click <em>Save settings</em>.{% endtrans %}</li>
<li>{% trans %}Click <em>Configure</em> on each enabled detection method and verify that its configuration is correct (or update the configuration if not).{% endtrans %}</li>
</ol>
---
label: 'Importing a translation file'
related:
- core.translations
- locale.translation_status
- locale.translate_strings
---
{% set import = render_var(url('locale.translate_import')) %}
<h2>{% trans %}Goal{% endtrans %}</h2>
<p>{% trans %}Import a file (.po extension) containing translations for user interface text.{% endtrans %}</p>
<h2>{% trans %}Steps{% endtrans %}</h2>
<ol>
<li>{% trans %}In the <em>Manage</em> administrative menu, navigate to <em>Configuration</em> &gt; <em>Regional and language</em> &gt; <em>User interface translation</em> &gt; <a href="{{ import }}"><em>Import</em></a>.{% endtrans %}</li>
<li>{% trans %}Browse to find the <em>Translation file</em> you want to import. Select the language and check the desired import options.{% endtrans %}</li>
<li>{% trans %}Click <em>Import</em> and wait for your file to be imported.{% endtrans %}</li>
</ol>
---
label: 'Translating user interface text'
related:
- core.translations
- locale.import
- locale.translation_status
- language.add
---
{% set translate = render_var(url('locale.translate_page')) %}
<h2>{% trans %}Goal{% endtrans %}</h2>
<p>{% trans %}Translate user interface text strings from English into a non-English language that is configured on your site.{% endtrans %}</p>
<h2>{% trans %}Steps{% endtrans %}</h2>
<ol>
<li>{% trans %}In the <em>Manage</em> administrative menu, navigate to <em>Configuration</em> &gt; <em>Regional and language</em> &gt; <a href="{{ translate }}"><em>User interface translation</em></a>.{% endtrans %}</li>
<li>{% trans %}Using the filters, search for a string or set of strings that you want to translate; make sure to select the correct <em>Translation language</em> if you have more than one non-English language on your site.{% endtrans %}</li>
<li>{% trans %}Enter new translations and click <em>Save translations</em>.{% endtrans %}</li>
<li>{% trans %}Repeat these steps until all of the desired user interface text is translated for all languages on your site.{% endtrans %}</li>
</ol>
---
label: 'Checking interface translation status'
related:
- core.translations
- locale.import
- locale.translate_strings
---
{% set language = render_var(url('entity.configurable_language.collection')) %}
{% set translation_updates = render_var(url('locale.translate_status')) %}
<h2>{% trans %}Goal{% endtrans %}</h2>
<p>{% trans %}Check the current status of interface translations, and see if there are any updates available.{% endtrans %}</p>
<h2>{% trans %}Steps{% endtrans %}</h2>
<ol>
<li>{% trans %}In the <em>Manage</em> administrative menu, navigate to <em>Configuration</em> &gt; <em>Regional and language</em> &gt; <a href="{{ language }}"><em>Languages</em></a>.{% endtrans %}</li>
<li>{% trans %}Look at the <em>Interface translation</em> column in the language table, to find the percentage of user interface text that has been translated for each language.{% endtrans %}</li>
<li>{% trans %}In the <em>Manage</em> administrative menu, navigate to <em>Reports</em> &gt; <em><a href="{{ translation_updates }}">Available translation updates</a></em>. This report is only available if the core Update Status module is installed.{% endtrans %}</li>
<li>{% trans %}Optionally, click <em>Check manually</em> to update the report.{% endtrans %}</li>
<li>{% trans %}View the report to find out if any languages have translation updates that you can download.{% endtrans %}</li>
</ol>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment