Label Formatting: Difference between revisions
Jump to navigation
Jump to search
>Jmarshall (New page: XBMC has a sophisticated label formatting engine, allowing the skinner to format up a particular label using bold, italics, full caps, lower case, and coloured text. This works on all lab...) |
CastagnaIT (talk | contribs) (Add tabs keyword) |
||
(22 intermediate revisions by 14 users not shown) | |||
Line 1: | Line 1: | ||
Kodi has a sophisticated label formatting engine, allowing the skinner to format up a particular label using bold, italics, full caps, lower case, and coloured text. | |||
This works on all labels throughout the interface. The syntax is similar to the "phpBB" syntax seen on some bulletin board software. | This works on all labels throughout the interface. The syntax is similar to the "phpBB" syntax seen on some bulletin board software. | ||
===Examples=== | [[Label Parsing|The $INFO and $LOCALIZE syntaxes are explained in more detail here.]] | ||
=== Examples === | |||
This is a long label that features different [COLOR red]colours[/COLOR] and [I]styles[/I]. | This is a long label that features different [COLOR red]colours[/COLOR] and [I]styles[/I]. | ||
Line 9: | Line 11: | ||
[LOWERCASE]$LOCALIZE[12345][/LOWERCASE] can be used to force a localize string to lowercase. | [LOWERCASE]$LOCALIZE[12345][/LOWERCASE] can be used to force a localize string to lowercase. | ||
===Keywords=== | === Keywords === | ||
The following keywords are used. | The following keywords are used. | ||
$INFO[ListItem.Title,prefix,postfix] - for specifying an [[ | * $INFO[ListItem.Title,prefix,postfix] - for specifying an [[InfoLabels|info label]]. | ||
$LOCALIZE[12345] - for specifying a localized string. | * $VAR[MyVariable,prefix,postfix] - for specifying a variable. | ||
[B]bold[/B] - bold text. | * $LOCALIZE[12345] - for specifying a localized string. | ||
[I]italics[/I] - italic text. | * $ADDON[script.music.foobar 12345] - for specifying a string provided by an addon. | ||
[COLOR red]red text[/COLOR] - colored text. | * $NUMBER[] - for specifying a numerical value. | ||
[UPPERCASE] | * [B]bold[/B] - bold text. | ||
[LOWERCASE] | * [I]italics[/I] - italic text. | ||
[CR] - carriage return (line break). | * [LIGHT]lighten[/LIGHT] - light weight text. {{note|Available from Kodi v16}} | ||
* [COLOR red]red text[/COLOR] - colored text. | |||
* [UPPERCASE]uppercase text[/UPPERCASE] - all text is made uppercase e.g. UPPERCASE TEXT | |||
* [LOWERCASE]lowercase text[/LOWERCASE] - all text is made lowercase e.g. lowercase text | |||
* [CAPITALIZE]capitalized text[/CAPITALIZE] - first letter of every word is capitalized (Isengard onward) e.g. Capitalized Text | |||
* [CR] - carriage return (line break). | |||
* [TABS]n[/TABS] - add tabulator spaces, replace "n" with the appropriate amount of tabs to add. {{note|Available from Kodi v20}} | |||
== See also == | |||
'''Development:''' | |||
* [[Add-on development]] | |||
* [[Skinning]] | |||
[[Category:Skin development]] |
Latest revision as of 11:12, 11 October 2022
Kodi has a sophisticated label formatting engine, allowing the skinner to format up a particular label using bold, italics, full caps, lower case, and coloured text.
This works on all labels throughout the interface. The syntax is similar to the "phpBB" syntax seen on some bulletin board software.
The $INFO and $LOCALIZE syntaxes are explained in more detail here.
Examples
This is a long label that features different [COLOR red]colours[/COLOR] and [I]styles[/I].
[LOWERCASE]$LOCALIZE[12345][/LOWERCASE] can be used to force a localize string to lowercase.
Keywords
The following keywords are used.
- $INFO[ListItem.Title,prefix,postfix] - for specifying an info label.
- $VAR[MyVariable,prefix,postfix] - for specifying a variable.
- $LOCALIZE[12345] - for specifying a localized string.
- $ADDON[script.music.foobar 12345] - for specifying a string provided by an addon.
- $NUMBER[] - for specifying a numerical value.
- [B]bold[/B] - bold text.
- [I]italics[/I] - italic text.
- [LIGHT]lighten[/LIGHT] - light weight text. Note: Available from Kodi v16
- [COLOR red]red text[/COLOR] - colored text.
- [UPPERCASE]uppercase text[/UPPERCASE] - all text is made uppercase e.g. UPPERCASE TEXT
- [LOWERCASE]lowercase text[/LOWERCASE] - all text is made lowercase e.g. lowercase text
- [CAPITALIZE]capitalized text[/CAPITALIZE] - first letter of every word is capitalized (Isengard onward) e.g. Capitalized Text
- [CR] - carriage return (line break).
- [TABS]n[/TABS] - add tabulator spaces, replace "n" with the appropriate amount of tabs to add. Note: Available from Kodi v20
See also
Development: