Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: [archived] gbp_l10n - Multilingual Publishing
steve this is AMAZING!!!!!!!!!!!!!!!! Beutiful work. Congrats…
this plugin SHOULD make it to the core.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#74 2006-12-18 14:38:13
- net-carver
- Archived Plugin Author
- Registered: 2006-03-08
- Posts: 1,648
Re: [archived] gbp_l10n - Multilingual Publishing
Luke,
yes, we are pretty much there. A few tidy-ups here and there and some interface sanity checking with Graeme, but as far as functionality goes it’s done — at least for this version. I’ll try to do a few quick movies of the admin side interface and get them up this week or early next.
I’m pondering release method at the moment but tending towards a ransom. Will let you know.
I plan on taking a break after this, Marios was right when he said this has taken far more than 150 hours of work!
— Steve
Offline
Re: [archived] gbp_l10n - Multilingual Publishing
Very , very nice, and definitely worth a ransom if that’s the method you decide upon. A break would be much deserved and at the right time too :-)
Offline
Re: [archived] gbp_l10n - Multilingual Publishing
net-carver wrote:
I plan on taking a break after this, Marios was right when he said this has taken far more than 150 hours of work!
Hi steve,
Count me in re contributing to the ransom but please please please, do provide an alternative method to paypal.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#77 2006-12-19 08:50:05
- net-carver
- Archived Plugin Author
- Registered: 2006-03-08
- Posts: 1,648
Re: [archived] gbp_l10n - Multilingual Publishing
Luke (fbox)
just a follow up to your post about localising page and form content by language.
The approach I took in my reply (when expanded in detail) would go like this…
Suppose you had a form that contained <txp:image id="10"/>
and you wanted to serve up a different image per visitor browse language then you could use multiple l10n_if_lang tags to serve up the correct image, like this…
<txp:l10n_if_lang lang=“en-gb”>
<txp:image id=“10”/>
</txp:l10n_if_lang>
<txp:l10n_if_lang lang=“el-rgr”>
<txp:image id=“20”/>
</txp:l10n_if_lang>
etc…
That’s very simple and follows the existing model very closely.
However, if you change your site languages it is not convenient as you then have to edit your page/form. I came up with a method I call ‘snippets’ that separates the content of the form from the renditions (translations), making things easier to extend and edit.
Snippets are simply delimited strings within pages and forms that the MLP Pack can use as indexes into TxP’s internal table of strings (just like the existing txp:text
tag does.) However, unllike the text tag, the MLP Pack can take care of snippet localisation within the body of the page/form before the page/form content is parsed by TxP. This makes it possible to localise attributes to tags.
So <txp:image id="10"/>
might become <txp:image id="##image_id##"/>
instead of the above list of conditionals.
Then you use the snippet editor to localise the string called image_id
and give it a different value for each language. This is much more compact than using the l10n_if_lang conditional tag for each language your site supports and needs no form/page edits if you decide to add a language to your site (but you would, of course, need to provide a translation for each ‘snippet’ in the new language.)
Last edited by net-carver (2006-12-19 08:53:59)
— Steve
Offline
#78 2007-01-02 10:34:01
- fbox
- Member
- From: Melbourne
- Registered: 2006-02-18
- Posts: 42
Re: [archived] gbp_l10n - Multilingual Publishing
All
Hope you enjoyed/are enjoying the festive season and had a bit of a break.
Net-carver / graeme
Thanks for your previous comprehensive post, Steve.
Just looking at the localised content form used in v.0.5 (demo version) and noticing that it automatically converts ASCII to plaintext.
I use ASCII encoding as a way of hiding email addresses from spambots, and noticed that after entering ASCII into TXPs article form, it was rendered as plaintext when I opened the article under the multilingual tab. The translated text also doesn’t retain ASCII but shows it as plaintext after I apply changes. Same goes for output HTML source.
I’m using Textpattern 4.0.4 (r1956) (with hak_tinymce 0.6.3, although I don’t think that would be affecting it).
Just wondering if you’ve already come across this and made changes in the much much more developed forthcoming release?
Cheers,
– LukeLast edited by fbox (2007-01-02 10:35:20)
Offline
#79 2007-01-06 07:11:10
- net-carver
- Archived Plugin Author
- Registered: 2006-03-08
- Posts: 1,648
Re: [archived] gbp_l10n - Multilingual Publishing
Luke
Could you post a sample for me (with a rubbish email address encoded) and I’ll check it out for you. You can contact me directly via the contact page of my site.
Edit
Fixed in dev version. Will be in the final release. Thank you.
Last edited by net-carver (2007-01-10 09:39:49)
— Steve
Offline
#80 2007-01-10 09:43:39
- net-carver
- Archived Plugin Author
- Registered: 2006-03-08
- Posts: 1,648
Re: [archived] gbp_l10n - Multilingual Publishing
All
I have prepared a flash movie explaining the admin interface and some of the features of the MLP Pack. You can view the movie on the demo site
You’ll need a flash capable browser and about 23 minutes to go through it.
There are a few features in the pack that are not shown in the movie — for example RTL/LTR language support via the toggle link above the string edit boxes and in the write tab were not demonstrated. Similarly, the localisation of Link and File descriptions; image alt-text and captions exist in the pack but were not included in the movie.
I have also updated the documentation about “making your plugins compatible with the MLP Pack” to include a section on getting your plugin to access localised data.
Last edited by net-carver (2007-01-13 05:56:46)
— Steve
Offline
#81 2007-01-10 10:11:54
- lee
- Member
- From: Normandy, France
- Registered: 2004-06-17
- Posts: 831
Re: [archived] gbp_l10n - Multilingual Publishing
Looking pretty damn good.
Offline
Re: [archived] gbp_l10n - Multilingual Publishing
- 23 minutes later *
That was awesome! Who needs a help file with presentations like that :)
Some things I noticed (of perhaps missed):- when you want to add new translations for a plugin (like ZCR in your example), does it have to be done for each string separately or can you add a translation for all strings of a single plugin all at once? When importing translation strings for a specific plugin, it showed a list of all strings with a translation. It wasn’t clear to me if those strings could be edited there if that page is only available during import or if you could reach it without having to import as well (yes, I am terribly lazy and do not like to click a lot)
- The snippets, are they delimited by ## … ## ? If so, is there an agreement with team textpattern not to use ## as part of the special textile markup to avoid problems in the future?
- What is the plugin name? It looks like it’s just l10n, while the unwritten TXP rule appears to be that each plugin is prefixed with a 3 character identifier (be it a person or a group) and an underscore.
- I read that ALT texts can be localized… what about the images themselves? That would be useful if you have images that contain text, like screenshots or buttons/logo’s. Same question applies to files with localized content. For those files/images it would be nice if not only the descriptions was localized. Or is are there conditional tags available like l10n_if_lang that can be used to get the same result?
Offline
#83 2007-01-11 02:43:18
- marios
- Archived Plugin Author
- Registered: 2005-03-12
- Posts: 1,253
Re: [archived] gbp_l10n - Multilingual Publishing
@Steve, this is cool,
What software do you use, to make the movies ?
Furthermore: The work, package as it is so far is very impressive.
- worthwhile to mention also, that string localization becomes a snapp now, so it is possible actually to have your fully localized backend, within less then two weeks.
- The package has been tested already quite much and solves most of the common localization areas.
( one of the latest most usefull additions beeing probably the category localization )
ruud wrote:
Some things I noticed (of perhaps missed):
- when you want to add new translations for a plugin…
@ruud, it’s all documented in this download, from the MLP Demo Site.
regards, marios
Last edited by marios (2007-01-11 03:00:40)
⌃ ⇧ < ⎋ ⌃ ⇧ >
Offline
#84 2007-01-12 08:33:34
- net-carver
- Archived Plugin Author
- Registered: 2006-03-08
- Posts: 1,648
Re: [archived] gbp_l10n - Multilingual Publishing
All
Sorry for the delayed reply,
I have no internet connection of my own at the moment and rely on a friend’s DSL. Yesterday I couldn’t access the forum. A router reboot today seems to have fixed it.
Marios wrote:
What software do you use, to make the movies ?
It was done with wink.
ruud wrote:
That was awesome! Who needs a help file with presentations like that :)
Thanks. Took a while to do all the editing but probably more helpful for overviews than the help file.
when you want to add new translations for a plugin (like ZCR in your example), does it have to be done for each string separately or can you add a translation for all strings of a single plugin all at once?
That would depend. If you have access to a file of translations that someone else exported; and it contained the language strings of interest to you; you could just import that and you have every string they translated for that plugin in one shot. If you had no file to hand then you would have to translate one-by-one until you are done. At that point you can export your translation for that plugin, share it if you want, and import it into any other MLP installation.
When importing translation strings for a specific plugin, it showed a list of all strings with a translation. It wasn’t clear to me if those strings could be edited there if that page is only available during import or if you could reach it without having to import as well (yes, I am terribly lazy and do not like to click a lot)
That’s the file summary screen. It’s read-only and there so you can sanity check other people’s translations to make sure you don’t (for example) import something offensive that you thought was benign. Making them editable in a batch like that might be a neat feature to add later though.
The snippets, are they delimited by ## … ## ? If so, is there an agreement with team textpattern not to use ## as part of the special textile markup to avoid problems in the future?
Yes, they are delimited by double-hashes. There is no agreement in place with team textpattern about this. They are only for use in pages and forms which, AFAIK, are not run through textile.
FYI, a little more on ‘snippets’ for you. Being string references, they come in two flavours…
- Textpattern’s built-in
text
tag. - the
##name##
format.
The first is recommended in every situation where you don’t need a localised attribute for a tag because it will work even if you cleanup and remove the MLP Pack. I recommend using the second (##
format) only when you need a localised string in a tag attribute.
What is the plugin name? It looks like it’s just l10n, while the unwritten TXP rule appears to be that each plugin is prefixed with a 3 character identifier (be it a person or a group) and an underscore.
Yes. This something Graeme and I discussed a long time ago now and we decided to go with l10n at the time despite the recommendations on name prefixing.
I read that ALT texts can be localized… what about the images themselves? … Or is are there conditional tags available like l10n_if_lang that can be used to get the same result?
Localisation of images can either be handled, as you guessed, by the l10n_if_lang
tag or simply using a snippet for the name/id attribte of the image
tag. Then you just edit the snippet and enter the name/number of the image for each language on your site.
The l10n_if_lang
tag can operate against a specific browse language or the direction of the visitor’s browse language — so it can also be used to serve RTL specific CSS files (as done on the demonstrator site.)
Last edited by net-carver (2007-01-13 05:51:58)
— Steve
Offline