Site News
Warning: This wiki contains spoilers. Read at your own risk!

Social media: If you would like, please join our Discord server, and/or follow us on Twitter (X) or Tumblr!

Template:Lang: Difference between revisions

From Fire Emblem Wiki, your source on Fire Emblem information. By fans, for fans.
mNo edit summary
mNo edit summary
Line 17: Line 17:
*<code><nowiki>{{lang|zh-Hant|令}}</nowiki></code> becomes {{lang|zh-Hant|令}}.
*<code><nowiki>{{lang|zh-Hant|令}}</nowiki></code> becomes {{lang|zh-Hant|令}}.


To use with {{t|hover}}, the hover template must be placed inside of the lang template, like so: <code><nowiki>{{lang|ja|{{hover|刃|ha}}}}</nowiki></code>. This becomes {{lang|ja|{{hover|刃|ha}}}}. Another template might be created in the future that combines this template and the hover template.
To use with {{t|hover}}, use the {{t|hoverlang}} template.


This template could possibly be used for all non-English text to assist with screenreaders, [[wikipedia:Template:Lang|as on Wikipedia]], but this is not necessary
This template could possibly be used for all non-English text to assist with screenreaders, [[wikipedia:Template:Lang|as on Wikipedia]], but this is not necessary


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

Revision as of 01:58, 6 August 2020

{{{2}}}

Usage

{{lang|language|text}}

Intended use: to make sure that Japanese and Chinese characters will display correctly. Due to the so-called Han unification, several Japanese and Chinese characters that look slightly different from one another but convey the same meaning are assigned the same point in Unicode, and so HTML language tags must be used to ensure that they display correctly.

"language" should be replaced with ja for Japanese, zh-Hans for Simplified Chinese, and zh-Hant for Traditional Chinese. See w3schools' article for language codes for other languages.

This template is already used by default in the {{Names}} and {{Flavor Text}} templates and so does not need to be used there.

Examples:

  • {{lang|ja|刃}} becomes .
  • {{lang|zh-Hans|刃}} becomes .
  • {{lang|zh-Hant|刃}} becomes .
  • {{lang|ja|令}} becomes .
  • {{lang|zh-Hans|令}} becomes .
  • {{lang|zh-Hant|令}} becomes .

To use with {{hover}}, use the {{hoverlang}} template.

This template could possibly be used for all non-English text to assist with screenreaders, as on Wikipedia, but this is not necessary