Template:X: Difference between revisions
From FrathWiki
Jump to navigationJump to search
m (blank lines) |
Cedh audmanh (talk | contribs) m (cat) |
||
(3 intermediate revisions by one other user not shown) | |||
Line 31: | Line 31: | ||
-->{{#if: {{{31|}}} |[[Image:{{{1}}}-{{{31}}}.{{{type|gif}}}{{!}}{{{size|}}}{{!}}{{{31}}}]]}}<!-- | -->{{#if: {{{31|}}} |[[Image:{{{1}}}-{{{31}}}.{{{type|gif}}}{{!}}{{{size|}}}{{!}}{{{31}}}]]}}<!-- | ||
-->{{#if: {{{rtl|}}} |</span>}}<noinclude> | -->{{#if: {{{rtl|}}} |</span>}}<noinclude> | ||
Convenience transliteration-to-images template for entering conlang script. | |||
Usage is: | |||
<tt><nowiki>{{</nowiki>x|''language name''|''character''|''character''|''character...''}} — for up to 30 characters. | <tt><nowiki>{{</nowiki>x|''language name''|''character''|''character''|''character...''}}</tt> — for up to 30 characters. | ||
Optional parameters are: | Optional parameters are: | ||
* <tt>size</tt> — to specify | * <tt>size</tt> — to specify a particular size for the images. The default is to use their natural size. I don't think resizing works well at the moment, so it's best to keep the original images around the same size and at a size suitable for text | ||
* <tt>rtl</tt> — to display the images in reverse order of entry (e.g. for a right-to-left language) | * <tt>rtl</tt> — to display the images in reverse order of entry (e.g. for a right-to-left language). | ||
* <tt>type</tt> — file extension of the images (if none is given, assumes <tt>gif</tt>) | * <tt>type</tt> — file extension of the images (if none is given, assumes <tt>gif</tt>) | ||
It works by doing <tt><nowiki>[[</nowiki>Image:''languagename''-''character''.gif]]</tt>, so to use it you'll need to have files with names matching that template in place. | It works by doing e.g. <tt><nowiki>[[</nowiki>Image:''languagename''-''character''.gif]]</tt>, so to use it you'll need to have files with names matching that template in place. | ||
Notice that the ''character'' portion is included as the image's alt text, so it'll be helpful if it's reasonably representative of the character's value.</noinclude> | Notice that the ''character'' portion is included as the image's alt text, so it'll be helpful if it's reasonably representative of the character's value. | ||
Example usage: | |||
:<tt>the Drake word *<nowiki>{{</nowiki>x|Drake|D|G|D|G}} /ðoɣðoɣ/</tt> | |||
which gives: | |||
:the Drake word *{{x|Drake|D|G|D|G}} /ðoɣðoɣ/ | |||
Of course since Drake is actually an RTL language we ought to do: | |||
:<tt>the Drake word *<nowiki>{{</nowiki>x|Drake|rtl=x|D|G|D|G}} /ðoɣðoɣ/</tt> | |||
which gives: | |||
:the Drake word *{{x|Drake|rtl=x|D|G|D|G}} /ðoɣðoɣ/ | |||
This template does not <tt>subst:</tt> gracefully. | |||
[[Category:Templates]] | |||
</noinclude> |
Latest revision as of 01:34, 5 October 2014
Convenience transliteration-to-images template for entering conlang script.
Usage is: {{x|language name|character|character|character...}} — for up to 30 characters.
Optional parameters are:
- size — to specify a particular size for the images. The default is to use their natural size. I don't think resizing works well at the moment, so it's best to keep the original images around the same size and at a size suitable for text
- rtl — to display the images in reverse order of entry (e.g. for a right-to-left language).
- type — file extension of the images (if none is given, assumes gif)
It works by doing e.g. [[Image:languagename-character.gif]], so to use it you'll need to have files with names matching that template in place.
Notice that the character portion is included as the image's alt text, so it'll be helpful if it's reasonably representative of the character's value.
Example usage:
- the Drake word *{{x|Drake|D|G|D|G}} /ðoɣðoɣ/
which gives:
Of course since Drake is actually an RTL language we ought to do:
- the Drake word *{{x|Drake|rtl=x|D|G|D|G}} /ðoɣðoɣ/
which gives:
This template does not subst: gracefully.