قالب:رمز لغة

من ويكيبيديا، الموسوعة الحرة
اذهب إلى: تصفح، ‏ ابحث

{{{2}}}

الغرض من هذا القالب هو الإشارة إلى، عبر رمز، أن فترة من النص تنتمي إلى لغة معينة. وفي كثير من الأحيان لا تقدم أي تغييرات مرئية على النص، ولكن يمكن أن يدفع متصفحات الويب لاستخدام خطاً أكثر ملاءمة، أو قارئات الشاشة أن تستخدم نوعاً معيناً من النطق. وهلم جرا. وقالب:قسم الرابط أدناه، يوفر مزيد من المعلومات.

التركيب والاستخدام

{{lang |ISO 639 language code |text}}

رمز أيزو 639 is usually a two- or three-letter abbreviation, in lowercase, of the language's name. لغة فرنسية, على سبيل المثال، له رمز "fr":

She said: "''{{رمز لغة|fr|Je suis française.}}''"

produces:

She said: "Je suis française."

By default, this template will place articles into the relevant subcategory of تصنيف:Articles containing non-English-language text. To suppress this – e.g. when using {{lang}} within a مساعدة:وصلة or the title parameter of a citation – add the parameter |nocat=true. If {{lang}} is used to identify a language read from right to left, e.g. لغة عربية, the template {{rtl-lang}} may be used afterward to ensure the standard (English) left-to-right formatting is resumed. It also supports the |nocat= parameter.

It is better to incorporate only the foreign-language text (linked if appropriate) inside the template, so that extraneous markup that is not from the non-English language in question does not receive incorrect metadata for that language. For example:

  • Use ''{{رمز لغة|it|[[goriziana]]}}''
  • Not {{رمز لغة|it|''[[goriziana]]''}}

This includes italicization as foreign; English-language quotation marks around titles of work in language that use other quotation character glyphs; italicization of titles in languages that do not use that convention; and emphasis that is not found (in one style or another) in the original non-English text; among other cases. If in doubt, put such markup outside the {{{2}}} .

There are also versions of this template for specific languages, intended for use the first time one of those languages appears in an article, that print the language's name and, for languages using the Latin alphabet, italicize the content automatically. For example, {{lang-es|español}} and {{lang-ru|русский язык}} yield, respectively, "(بالإسبانية: español)" and "روسية: русский язык" (without the quotation marks).

Language subtags can be used to indicate a regional variant of and/or a particular script used for a language. According to the رابطة الشبكة العالمية, "the golden rule when creating language tags is to keep the tag as short as possible",[1] so such subtags should only be added if there is good reason to use them. أيزو 639-1 is preferred over أيزو 639-2 and أيزو 639-3.

خط مائل

By default, {{lang|[language code]|...}}  outputs plain text, while {{lang-[language code]|...}}  templates (e.g. {{lang-de}}) output text in italics, except for languages that do not use a Latin-based script. If, with the latter, plain text is required (e.g. for proper names), {{noitalic}} may be used. For example,

... the border town of Ventimiglia ({{فرن|{{غير مائل|Vintimille}}}})

produces:

... the border town of Ventimiglia ((بالفرنسية: Vintimille

))

Indicating writing script

If necessary, add the ISO 15924 code to indicate the script.

For example, لغة روسية is usually written in the ألفبائية كيريلية, therefore the Cyrl script code is superfluous and the language code will be ru instead of ru-Cyrl. However, when that text is نقحرة the transl code (transliteration) should be used because it isn't the default script for Russian: ru-Latn. Example:

* Moscow ([[لغة روسية]]: {{رمز لغة|ru|Москва́}}, ''{{نسخ|ru|Moskva}}'')

which is the same as

* Moscow ({{Lang-ru|Москва́}}, ''{{نسخ|ru|Moskva}}'')

Results in your browser:

Instead of using ''{{نسخ|ru|Moskva}}'' the ''{{رمز لغة|ru-Latn|Moskva}}'' can be used, but if you specified a font and a size for the target language in your custom CSS (see Help:User style), the transliteration will appear in that specified style. To specify a transliteration scheme, for example, you are using the أيزو 9 transliteration of Cyrillic, use ''{{نسخ|ru|ISO|Moskva}}'':

The أيانا maintains a list specifying when the script tag should be suppressed [1]. In some cases, the script must be always specified, like لغة طاجيكية which can be equally written in قائمة الحروف العربية المشتقة, ألفبائية لاتينية or ألفبائية كيريلية alphabets:

* Tajik ({{Rtl-lang|tg-Arab|تاجیکی}}, ''{{نسخ|tg|tojikī}}'', {{رمز لغة|tg-Cyrl|тоҷикӣ}})

Which results in your browser:

  • Tajik (تاجیکی, tojikī, тоҷикӣ)

Note the use of {{rtl-lang}} instead of {{lang}} when using the Arabic script (see قالب:Section link).

Undetermined language

The {{lang}} template is not only used to specify the language of foreign words, but also to specify a single symbol or character in a specific script, for example when discussing about a specific writing system. Many times the character / symbol is used in several languages, but when the article refers to the غرافيم itself the أيزو 639-2 and أيزو 639-3 language code und for Undetermined language should be used. For example:

The {{رمز لغة|und-Hani|字}} Han character has 6 strokes.
The Han character has 6 strokes.

Han characters are used in Chinese, Japanese, sometimes Korean, and formerly Vietnamese, and in this case the character is not used for any specific language. Note that the script code used is Hani, which specifies generic Han characters (Hanzi, Kanji, Hanja).

Compare {{script}}

The {{خط|Hani|字}} Han character has 6 strokes.
The Han character has 6 strokes.

مشير إلى البديل الإقليمي

In some cases, maybe it will be needed to add أيزو 3166-1 حرفي-2 country codes (specific usage of that country). Of course the three codes can appear in the same tag, for example the code zh-Hant-TW will be used for لغة صينية text written with حروف صينية تقليدية, containing words or expressions specific to تايوان. zh-Hans is for simplified. Examples:

* {{رمز لغة|zh-Hant-TW|臺灣}}

الناتج في برنامج التصفح الخاص بك:

  • 臺灣

اتجاه الكتابة

{{rtl-lang}} is used to wrap strings of right-to-left text (from languages like لغة عربية or لغة عبرية) embedded in left-to-right text, and resets text direction to left-to-right at its conclusion. For whole paragraphs of right-to-left text, use {{rtl-para}}. The rtl- prefix is not needed in the {{lang-xx}} form, as this is implied by the language: there is no {{rtl-lang-ar}}, for instance: just use {{lang-ar}}.

الأساس المنطقي

أساليب تطبيق

You can apply كاسكادينج ستايل شيت styles in your user style sheet. Registered users can put styles into User:XXX/monobook.css, where XXX is the user name.

These examples may work in إنترنت إكسبلورر 8; prior versions do not support attribute selectors. Alternatively, try قائمة متصفحات الويب such as فيرفكس.

Example: to apply a font to Russian-language text:

 span[lang|=ru] { font-family: fonteskaya; }

Example: to apply a colour to text marked with any language:

 span[lang] { color: green; }

Do not use quotation marks in your user style sheet; wikitext would screw them up. They are recommended in CSS, but not required other than for font families containing generic-family keywords ('inherit', 'serif', 'sans-serif', 'monospace', 'fantasy', and 'cursive'). See here for details.

بيانات القالب

هذا توثيق بيانات القالب لهذا القالب المستخدم بواسطة المحرر المرئي والأدوات الأخرى.

بيانات قالب رمز لغة

Indicate that a given span of text belongs to a particular language. Use by browsers which use different styles for different languages.

وسائط القالب

وسيط وصف نوع حالة
Language code 1

A language tag or an ISO 639 language code, e.g. fr (the code for French).

غيابي
فارغ
مثال
فارغ
قيمة تلقائية
فارغ
String مطلوب
Text 2

The text e.g. Je suis française.

غيابي
فارغ
مثال
فارغ
قيمة تلقائية
فارغ
String مطلوب

انظر أيضاً

مزيد من المعلومات

مراجع

  1. ^ Overview for Language Tags at رابطة الشبكة العالمية
  2. ^ Heilmann، Chris (13 Mar 2008). "Yahoo! search results now with natural language support". ياهو! Blog. تمت أرشفته من الأصل على 25 Jan 2009. اطلع عليه بتاريخ 28 Feb 2015. 
  3. ^ أ ب ت Ishida، Richard (18 November 2014). "Why use the language attribute?" (Previously by Deborah Cawkwell, BBC World Service). World Wide Web Consortium. اطلع عليه بتاريخ 1 Mar 2015. 
  4. ^ "6.4 Ligatures: the font-variant-ligatures property". CSS Fonts Module Level 3 W3C Candidate Recommendation 3 October 2013.