Jump to content

Template:TTS/aural: Difference between revisions

From Philosophical Research
m change part of .help to .bracket to make copying less confusing
m allow tts parameter to be empty - this is for templates which merely call this one
Line 1: Line 1:
{{HueCSS}}
{{HueCSS}}
<pre style="display: none;"><onlyinclude><{{{html|span}}} {{#if:{{{lang|}}}|lang="{{{lang}}}"|}} class="tts {{{class|}}}" {{#switch: {{{ParameterWhichShouldAlwaysBeEmpty|}}}|{{{tts|}}}{{{2|}}}{{{title|}}}=title{{=}}""|{{{tts|}}}{{{title|}}}=title{{=}}"{{{2|}}}"|{{{2|}}}{{{title|}}}=title{{=}}"{{{tts|}}}"|title{{=}}"{{{title|}}}"}}><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|}}} = error: TTS pronunciation missing | {{{tts|}}} = {{{2|error: TTS pronunciation missing}}} | {{{2|}}} = {{{tts|error: TTS pronunciation missing}}} | #default = {{{2|error: TTS pronunciation missing}}} }}</i><span class="bracket" aria-hidden="true">)</span></{{{html|span}}}></onlyinclude></pre>
<pre style="display: none;"><onlyinclude><{{{html|span}}} {{#if:{{{lang|}}}|lang="{{{lang}}}"|}} class="tts {{{class|}}}" {{#switch: {{{ParameterWhichShouldAlwaysBeEmpty|}}}|{{{tts|}}}{{{2|}}}{{{title|}}}=title{{=}}""|{{{tts|}}}{{{title|}}}=title{{=}}"{{{2|}}}"|{{{2|}}}{{{title|}}}=title{{=}}"{{{tts|}}}"|title{{=}}"{{{title|}}}"}}><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></{{{html|span}}}></onlyinclude></pre>


== Demo ==
== Demo ==

Revision as of 11:02, 24 August 2025

<onlyinclude><{{{html|span}}} {{#if:{{{lang|}}}|lang="{{{lang}}}"|}} class="tts {{{class|}}}" {{#switch: {{{ParameterWhichShouldAlwaysBeEmpty|}}}|{{{tts|}}}{{{2|}}}{{{title|}}}=title{{=}}""|{{{tts|}}}{{{title|}}}=title{{=}}"{{{2|}}}"|{{{2|}}}{{{title|}}}=title{{=}}"{{{tts|}}}"|title{{=}}"{{{title|}}}"}}><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></{{{html|span}}}></onlyinclude>

Demo

pronounced displayed string

pronounced displayed string in older style

oddly-pronounced word demo: pronounced 1337

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.