Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2011-07-27 08:51:46

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Using txp:text in a theme - questions

OK, I need a bit of clarification here. What language string groups from the database txp_lang table should I be using along with <txp:text> in a theme to safely allow for multi language support?

I’m guessing only ‘public’ and ‘common’, or maybe also ‘tag’?

I’m also conscious that using strings from the above groups, although a line of text appears to be appropriate to what I want in English, maybe in another language that text is a completely different context. An example being “Comment” – in English that could be an actual comment itself or an invite to make a comment, in other languages I’m not sure the same would apply. Hope I’m explaining myself OK.

Cheers!

Last edited by philwareham (2011-07-27 08:52:01)

Offline

#2 2011-07-27 09:14:31

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,946
Website GitHub

Re: Using txp:text in a theme - questions

philwareham wrote:

I’m guessing only ‘public’ and ‘common’.

Correctamundo.


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

#3 2011-07-27 09:23:49

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: Using txp:text in a theme - questions

OK, thanks Stef. And if I want to propose a small handful of additions to the txp_lang table for a future release of Textpattern, that would be in the ‘public’ group?

Offline

#4 2011-07-27 09:25:43

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,946
Website GitHub

Re: Using txp:text in a theme - questions

philwareham wrote:

if I want to propose a small handful of additions to the txp_lang table for a future release of Textpattern, that would be in the ‘public’ group?

If it’s only for the public side, then yes. If there’s a chance the strings will be useful to the admin side as well then they’ll go in common.


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

#5 2011-07-27 09:30:42

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: Using txp:text in a theme - questions

Thanksamundo!

Offline

#6 2011-07-27 12:35:23

stephan
Plugin Author
From: Bochum, Germany
Registered: 2004-07-26
Posts: 196
Website

Re: Using txp:text in a theme - questions

Let’s take this a step further. Is there any suggested way to deal with localized strings in a template that is simple enough to be distributed with a template (so that it does not change core tables and also is simple enough for non-tech users to import)?


Yoko for Textpattern – A free blog themeMinimum Theme – If all you want to do is write.
Note: I am currently not actively using Textpattern, so I am not in the forums very often

Offline

#7 2011-07-27 12:38:50

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,946
Website GitHub

Re: Using txp:text in a theme - questions

stephan wrote:

Is there any suggested way to deal with localized strings in a template that is simple enough to be distributed with a template

Textpacks


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

#8 2011-07-27 13:01:23

stephan
Plugin Author
From: Bochum, Germany
Registered: 2004-07-26
Posts: 196
Website

Re: Using txp:text in a theme - questions

Ok, so I think I finally understand the concept. Now all I need to do is wrap together a plugin that does the textpack installation for the user to ease the process :)
Thanks!


Yoko for Textpattern – A free blog themeMinimum Theme – If all you want to do is write.
Note: I am currently not actively using Textpattern, so I am not in the forums very often

Offline

#9 2011-07-27 13:27:13

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,946
Website GitHub

Re: Using txp:text in a theme - questions

stephan wrote:

wrap together a plugin that does the textpack installation for the user to ease the process :)

That’d be cool. The only people that can install Textpacks are those who have Admin->Prefs->Languages rights or those who can install plugins.

If you’re going down this route, please check rsilletti’s plugin first so you’re not covering the same ground.


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