Создание файла определения языка

From Joomla! Documentation

This page is a translated version of the page Creating a language definition file and the translation is 23% complete.
Outdated translations are marked like this.
Other languages:
Deutsch • ‎English • ‎Nederlands • ‎español • ‎français • ‎português • ‎русский
Joomla! 
3.x
серия
Copyedit.png
This Article Needs Your Help

This article is tagged because it NEEDS REVIEW. You can help the Joomla! Documentation Wiki by contributing to it.
More pages that need help similar to this one are here. NOTE-If you feel the need is satistified, please remove this notice.


Формат файлов определения языка очень прост. Пустые строки и строки, начинающиеся с "#" игнорируются и знак "#" можно использовать для создания в файле комментариев. Каждая строчка состоит из двух разделенных знаком равенства наборов знаков, как в нижеследующем примере:

<div class="mw-translate-fuzzy">
КЛЮЧ=Значение
</div>

где “КЛЮЧ” - это ссылка на переводимый текст и “Значение” - это переводимый текст. Например:

ADDITIONAL_INFORMATION="Additional Information"

Different versions of Joomla have used slightly different ways to read language files (namely a custom parser and the native PHP INI parser, the latter of which was buggy in PHP 5.2 and older), leading to different rules for what exactly is allowed in keys and values. Language files that abide by the following rules should work under many versions of Joomla, but at least on Joomla Joomla 3.x and newer.

КЛЮЧ” может включать пробелы и знаки пунктуации, но пробелов не должно быть по обе стороны от знака равенства, в ввиду его значения. Если более чем одна языковая строка имеет одно и то же значение с левой [от знака равенства] стороны, то будет использована та, которая найдена последней.

"ЗНАЧЕНИЕ" не может содержать знак двойных кавычек ("). Вместо этого их необходимо вводить используя набор специальных символов "&quot;". Одиночные кавычки действительны.

WARNING_TEXT="<span class=\"red\">Warning!</span>"

Note that these rules are stricter than required by the PHP INI parser. For example, the PHP INI parser allows you to omit the double quotes around the value as long as it does not contain certain characters. Using the rules above should make it much easier to avoid mistakes like forgetting double quotes when they are required.

Более подробная информация об обсужденных изменениях в сериях [версий] Joomla! 2.5 и 3.х, может быть найдена на странице спецификации языковых файлов