টেমপ্লেট:Language/নথি
![]() | এটি টেমপ্লেট:Language-এর জন্য একটি নথির উপপাতা। এখানে ব্যবহার সংক্রান্ত তথ্য, বিষয়শ্রেণী এবং অন্যান্য সামগ্রী রয়েছে যা মূল টেমপ্লেট পাতার অংশ নয়। |
This template is used to convert ISO 639 language codes into language names
ব্যবহার
[সম্পাদনা]- Parameter 1 (compulsory) is the ISO 639-1 (two-letter) or ISO 639-2 (three letter) code for the language to output.
- Parameter 2 (optional) is the two- or three-letter code for the language the result should be displayed in. If no valid parameter is given, the default is
en
A list of language codes can be found at ISO 639-1 language matrix, List of ISO 639-1 codes, and List of ISO 639-2 codes.
Please note that this system requires a huge number of separate language names (~35,000) and so is currently very incomplete. If the required name has not already been defined for a particular language, the template will display an error (if no translations have been specified for the language, english translations will be returned). If you feel confident enough with a language that is not already defined, please take a few moments to create a new set of definitions for it.
উদাহরণ
[সম্পাদনা]- {{language|en}} → ইংরেজি
- {{language|fr}} → ফরাসি
- {{language|en|fr}} → ইংরেজি
- {{language|fr|en}} → ফরাসি
- {{language|fr|fr}} → ফরাসি
প্রযুক্তির খুঁটিনাটি
[সম্পাদনা]This template works by calling a subpage (list) with the relevant language code for the second parameter (the return language); this subpage contains a switch statement that converts the first parameter into the name in the appropriate language. See for instance {{language/en}}
, which is called to translate codes into English.
Because some language codes are very uncommon, it is possible to split a language into two subpages, eg /fr and /fr+. The /fr page is called first, and should contain the more common languages. Less common languages should be added to the /fr+ page, which is called only if no translation is found in the main subpage; between them, the two pages should contain all the available translations.
আরও দেখুন
[সম্পাদনা]- commons:Template:Language/en - converts many language codes into English names. Its main purpose is conversion of the codes used in Wikimedia (Names.php and wiki names) but many are ISO codes as well.
- টেমপ্লেট:language icon
- টেমপ্লেট:flag icon