Jump to content

Template:TTS/aural: Difference between revisions

From Philosophical Research
m allow omitting tts to produce ordinary html tag - mainly useful for other templates which only optionally include Template:TTS
t1 / t3 parameters
Line 1: Line 1:
{{HueCSS}}<!--
{{HueCSS}}<!--
--><includeonly><onlyinclude><{{{html|span}}} {{#if:{{{lang|}}}|lang="{{{lang}}}"|}} class="tts {{{class|}}}" {{#switch:{{{NoTitle|}}}|y=title{{=}}""|{{{tts|}}}{{{2|}}}{{{title|}}}=title{{=}}""|{{{tts|}}}{{{2|}}}{{{title|}}}=title{{=}}""|{{{tts|}}}{{{title|}}}=title{{=}}"{{{2|}}}"|{{{2|}}}{{{title|}}}=title{{=}}"{{{tts|}}}"|#default=title{{=}}"{{{title|}}}"}}>{{#if:{{{tts|}}}|<span class="visual" aria-hidden="true">{{{1}}}</span><span class="bracket" aria-hidden="true"> (</span><span class="help">pronounced </span><i {{#switch: {{{ParameterWhichShouldAlwaysBeEmpty|}}}|{{{lang2|}}}{{{lang|}}}=data-lang{{=}}""|{{{lang|}}}=data-lang{{=}}"{{{lang2}}}"|{{{lang2|}}}=data-lang{{=}}"{{{lang}}}"|#default=data-lang{{=}}""}} class="aural">{{#switch: {{{ParameterWhichShouldAlwaysBeEmpty|}}} | {{{tts|}}}{{{2|}}}{{{1|}}} = error: TTS pronunciation missing | {{{tts|}}}{{{1|}}} = {{{2|error: TTS pronunciation missing}}} | {{{2|}}}{{{1|}}} = {{{tts|error: TTS pronunciation missing}}} | #default = {{{1|error: TTS pronunciation missing}}} }}</i><span class="bracket" aria-hidden="true">)</span>|{{{1|}}}}}</{{{html|span}}}></onlyinclude></includeonly><!--
--><includeonly><onlyinclude>{{#if:{{{t1|}}}|<span aria-hidden="true">{{{t1|}}}</span>}}<{{{html|span}}} {{#if:{{{lang|}}}|lang="{{{lang}}}"|}} class="tts {{{class|}}}" {{#switch:{{{NoTitle|}}}|y=title{{=}}""|{{{tts|}}}{{{2|}}}{{{title|}}}=title{{=}}""|{{{tts|}}}{{{2|}}}{{{title|}}}=title{{=}}""|{{{tts|}}}{{{title|}}}=title{{=}}"{{{2|}}}"|{{{2|}}}{{{title|}}}=title{{=}}"{{{tts|}}}"|#default=title{{=}}"{{{title|}}}"}}>{{#if:{{{tts|}}}|<span class="visual" aria-hidden="true">{{{1}}}</span><span class="bracket" aria-hidden="true"> (</span><span class="help">pronounced </span><i {{#switch: {{{ParameterWhichShouldAlwaysBeEmpty|}}}|{{{lang2|}}}{{{lang|}}}=data-lang{{=}}""|{{{lang|}}}=data-lang{{=}}"{{{lang2}}}"|{{{lang2|}}}=data-lang{{=}}"{{{lang}}}"|#default=data-lang{{=}}""}} class="aural">{{#switch: {{{ParameterWhichShouldAlwaysBeEmpty|}}} | {{{tts|}}}{{{2|}}}{{{1|}}} = error: TTS pronunciation missing | {{{tts|}}}{{{1|}}} = {{{2|error: TTS pronunciation missing}}} | {{{2|}}}{{{1|}}} = {{{tts|error: TTS pronunciation missing}}} | #default = {{{1|error: TTS pronunciation missing}}} }}</i><span class="bracket" aria-hidden="true">)</span>|{{{1|}}}}}</{{{html|span}}}>{{#if:{{{t3|}}}|<span aria-hidden="true">{{{t3|}}}</span>}}</onlyinclude></includeonly><!--


Put visually clearer version below for debug purposes:
Put visually clearer version below for debug purposes:


{{#if:{{{t1|}}}|<span aria-hidden="true">{{{t1|}}}</span>}}
<{{{html|span}}}_
<{{{html|span}}}_
{{#if:{{{lang|}}}|lang="{{{lang}}}"|}}_
{{#if:{{{lang|}}}|lang="{{{lang}}}"|}}_
Line 36: Line 37:
   }}
   }}
</{{{html|span}}}>
</{{{html|span}}}>
{{#if:{{{t3|}}}|<span aria-hidden="true">{{{t3|}}}</span>}}


-->
-->

Revision as of 21:07, 3 October 2025

Demo

pronounced displayed string

displayed string in older style

oddly-pronounced word demo: pronounced 1337

using this template just for an HTML tag: ordinary phrase

number list

  1. pronounced Z–617 pronounced [Z] unique object coded as Z Item

Description

This is a template for giving bits of text a TTS pronunciation.

This page is the main "guts" of Template:TTS, which needed to be broken up to properly create linking capabilities.