Translation
Table of contents
Multilingualism is controlled by the "Translation" entity. The functionality of exporting strings for translations and importing them is available.
Translation import page (/admin/all/languages):
- Download strings for translation - link to export translations;
- Destination language - code of the language for which the import is performed (ru, en, etc.);
- Format with original lines - lines in txt format, each value must be separated by two empty lines;
- Format with translated strings - strings in txt format, each value must be separated by two empty lines.
During the import of translations, files are split and arrays are created with source strings and their translated counterparts - so it is important that the number of strings (translation objects) match. A search will be performed for already existing rows in the database - if found, an update is performed, otherwise an addition.
The following operations are available for exporting strings (/admin/all/languages/export and /admin/all/languages/export/hard):
- Export - export of translations (download files);
- Generate and export - walk through the content and add strings to the database, after which the translations are exported (file download).
A delete all link is available - /admin/all/languages/clear, which will delete all strings and imported translations.
A language bar can be placed on the site to switch languages:
It is enough to add the required languages and add a parameter of the form ?l=* to the link, where * is the language code (ru, en, etc.). In addition, such a parameter can be sent both by the GET method and by the POST method.
It is worth noting that translations can contain HTML code and line breaks (no more than two breaks, otherwise it counts as the next translation object):
Latest articles
- 03.04.24IT / Уроки PHP Уроки простыми словами. Урок 3. Все операторы PHP с примерами, с выводом работы кода на экран.
- 02.04.24IT / Уроки PHP Уроки простыми словами. Урок 2. Типы данных в PHP с примерами.
- 02.04.24IT / Уроки PHP Уроки простыми словами. Урок 1. Коротко о языке веб-программирования PHP. Основы синтаксиса.
- 09.11.23IT / Database Errors when migrating from MySQL 5.6 to 5.7 and how to fix them - database dump import failed with an error or INSERT does not work. Disabling STRICT_TRANS_TABLES strict mode or using IGNORE
- 08.07.22IT / Misc Convert office files DOC, DOCX, DOCM, RTF to DOCX, DOCM, DOC, RTF, PDF, HTML, XML, TXT formats without loss and markup changes