Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: smd_babel: Manage string translations from the admin side
@Jakob:
However, I can imagine a lang attribute would be useful to show another language, for example for a language switcher where you explicitly say lang=“fr” or when using a variable that holds the current language of a multi-language site […]
That’s exactly what I’m doing on my website with the help of my tiny plugins: pat_text
and pat_lang_detect
.
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline
Re: smd_babel: Manage string translations from the admin side
Slightly OT but I think a language switcher might be better solved with a language container tag:
<txp:langs wraptag="ul" break="li">
<a href="<txp:site_url/>/<txp:lang />"><txp:text item="lang_name" /></a>
</txp:langs>
We might decide to add a lang
attribute to the container that would permit a selection of languages to be offered, e.g. lang="en,fr,de"
.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: smd_babel: Manage string translations from the admin side
Better, sure!
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline
Re: smd_babel: Manage string translations from the admin side
v1.0.4 is released that fixes a minor issue with the word false
appearing by mistake in the Admin language column.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline