틀:CURRENTCONTENTLANGUAGE: 두 판 사이의 차이

Revi HQ
내용 추가됨 내용 삭제됨
잔글 (ortho)
잔글 (판 9개를 가져왔습니다: from wmfmeta)
 
(사용자 5명의 중간 판 6개는 보이지 않습니다)
1번째 줄: 1번째 줄:
{{#if:{{#invoke:Template translation|getLanguageSubpage}}|{{#invoke:Template translation|getLanguageSubpage}}|{{CONTENTLANGUAGE}}}}<noinclude>{{Documentation}}</noinclude>
<includeonly>{{#ifeq:{{#language:{{SUBPAGENAME}}}}|{{lc:{{SUBPAGENAME}}}}|en|{{SUBPAGENAME}}}}</includeonly><noinclude>This template returns the "content language" of the current page; more precisely it checks if the current title ends with a language code, and if it is the case it returns this language code, else "en" for English.

Examples:
* on "Bar/foo", this template returns "en";
* on "Bar/foo/hu", this template returns "hu".
(Note: on "Foo/bar" it returns "bar" because "bar" is the language code for Bavarian; "foo" is not a language code; very small (2 or 3 letters) last words can be a problem as seen here.)

This template takes no argument, and acts as a magic word. If such a magic word is created in MediaWiki, this template could be deleted. Note that the definition of "content language" here is broader than the (page-specific) content language in MediaWiki, which can currently only be set by the Translate extension or some very special pages.

[[Category:Translation templates]]</noinclude>

2021년 1월 6일 (수) 07:21 기준 최신판

ko

Template documentation[create]