Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2019-01-24 12:41:56

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,499
Website GitHub Twitter

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

#14 2019-01-24 12:55:20

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 10,568
Website GitHub

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

#15 2019-01-24 13:27:10

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,499
Website GitHub Twitter

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

#16 2019-09-17 13:54:13

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 10,568
Website GitHub

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

Board footer

Powered by FluxBB