Bản mẫu:Country showdata/doc

Bản mẫu này được dùng để tạo trang tài liệu cho các siêu bản mẫu country data sử dụng bởi hệ thống bản mẫu cờ. Kết quả của bản mẫu này có thể thấy ở phần tài liệu trên trang bản mẫu của một bản mẫu bất kì trong số các bản mẫu tại :Thể loại:Bản mẫu dữ liệu quốc gia.
See :en:Wikipedia:WikiProject Flag Template for the main documentation and discussion page for the flag template system.

**Sử dụng**
This template is automatically invoked by the standard syntax of a country data template: 
The first parameter to a country data template is usually the name of a formatting meta-template. For example, Bản mẫu:Lá cờ uses Bản mẫu:Lá cờ/core to actually render the flag icon and wikilink. If the first parameter is missing, which is the case when a country data template is viewed directly, the template code fragment  ensures that this template will be used as the default first parameter. This technique ensures that country data templates are "self-documenting" if they use the standard syntax.

**Các tham số thêm**
Many country data templates require additional documentation beyond the standard mandatory alias and flag alias parameters. This template will automatically document standard optional parameters (such as shortname alias) if present, and can document unique optional parameters (such as flag variants) if instructed to. This latter method uses documentation-specific parameters in the country data template to activate the additional output from this template. These documentation parameters are set off from the rest of the parameters in the country data template by a  section:
var1 = ...
redir1 = ...
related1 = ...

**Biến thể cờ**
Flag variants are added to a country data template by the inclusion of one or more flag alias-label parameters, where each label is a unique identifier that is subsequently used as an input parameter to , , etc. To document these flag variants, use the varN documentation parameters to identify each label.
For example, Bản mẫu:Country data Seychelles identifies three flag variants (in addition to the current flag) with the following code:
flag alias-1976 = Flag of the Seychelles 1976.svg
flag alias-1977 = Flag of the Seychelles 1977.svg
flag alias-colonial = Government Ensign of the United Kingdom.svg
These three variants are documented by the following code segment later in the template:
var1 = 1976
var2 = 1977
var3 = colonial
...

Up to forty flag variants can be documented by this method (using var1 to var40).  If more are present, these can be listed on a separate documentation subpage as described below.
Note that you do not have to use a varN parameter for the standard optional variant labels naval, air force and army (used for the country's naval, air force and army ensigns, respectively). If present, they will automatically be documented.

**Redirect aliases**
Many country data templates have alias names that can be used instead of the usual country name with all of the main flag templates. These are usually, but not exclusively, standard country code abbreviations such as those specified in ISO 3166-1 alpha-3 or by the IOC or FIFA. These are implemented as redirects, and are listed in :Category:Country data redirects.
For example, Bản mẫu:Country data DEU and Bản mẫu:Country data GER both redirect to Bản mẫu:Country data Đức, because DEU is the ISO code and GER is the IOC and FIFA code for Germany. Therefore, , , and  all have the same result. These redirect aliases are documented by the following template code fragment:
...
redir1 = DEU
redir2 = GER
...
Up to five flag redirects can be documented by this method (using redir1 to redir5).

**Related templates**
Several country data templates are used for alternative forms to the common country data template for the nation, usually but not exclusively for historic nations. Pointers to these alternative templates are useful additions to the template documentation so that editors can use the correct template for their specific purposes.
For example, Bản mẫu:Country data Serbia và Montenegro includes the following code to document three other related country data templates:
...
related1 = Serbia
related2 = Montenegro
related3 = FR Yugoslavia
...
Up to six related flags can be documented by this method (using related1 to related6).

**Flag article link**
This template shows a large flag image on the right of the documentation box, with a link to an article about the flag in the caption if it exists. The page that it evaluates is "Flag of alias", with the value of alias in the template code replacing alias. If there is an article about the flag even though "Flag of alias" does not exist, either create the latter as a redirect to the correct page or add the following parameter:
...
flag link = Article name
...
This can also be used to override the automatic link if "Flag of alias" does exist but leads to the wrong article.

**Additional documentation**
For situations where the automatic documentation method is not completely adequate, additional documentation can be displayed by country showdata. Simply create a documentation subpage (named as Bản mẫu:Country data Tênquốcgia/doc) with the additional material, and it will be transcluded after all other output sections.
For example:
*Bản mẫu:Country data Ireland/doc is used to explain why that template is distinct from Bản mẫu:Country data Cộng hòa Ireland
*Bản mẫu:Country data France/doc is used to document the list of country data templates available for each of the regions of France
*Bản mẫu:Country data Hoa Kỳ/doc is used to document the full set of flag variants (for each number of stars), and to list all of the country data templates available for state and territory flags

**Phân loại**
This template automatically categorizes pages it is transcluded on in :Category:Country data tracking categories. Content categories, such as those by country or by type/status, should be added manually by putting them inside includeonly tags on a template's documentation subpage. If a template does not have a documentation page yet, click on the "/doc" link at the bottom of the automatic documentation, add categories between the preloaded open tags and save the page.
The default sort key used for the automatic categories is the part after Bản mẫu:Country data in the page title. The parameter cat can be used to specify a custom ASCII sorting key for these categories. For example, Bản mẫu:Country data Quần đảo Åland and Bản mẫu:Country data Cộng hòa Ireland use this parameter to sort them under "A" and "I" respectively.
Automatically added by this template:- Tất cả các bản mẫu dữ liệu quốc gia- Bản mẫu dữ liệu quốc gia có tên ngắn khác biệt- Bản mẫu dữ liệu quốc gia có tên bản mẫu khác biệt- Bản mẫu dữ liệu quốc gia chưa được phân loại