created: 20211209040935294
creator: Sttot
list-after: $:/core/ui/ViewTemplate/tags
modified: 20211214150730666
modifier: Sttot
tags: ExcludeFromEmpty $:/tags/ViewTemplate
title: LanguageSwitcher
type: text/vnd.tiddlywiki

<$list filter="[[$:/language]get[text]removeprefix[$:/languages/]else[en-GB]]" variable="lang">
<%if [<lang>search[zh]] %>
<$button set="$:/language" setTo="$:/languages/en-GB" style="">🇬🇧 Switch to English</$button>
<%endif%>
<%if [<lang>!search[zh]] %>
<$button set="$:/language" setTo="$:/languages/zh-Hans" style="">🇨🇳 切换至中文</$button>
<%endif%>
</$list>