Tags:
create new tag
view all tags
ALERT! Warning: This topic was a try to figure out the best way for I18N within TWiki, and no more reflects the state-of-the-art thoughts about the subject.

It's being kept here for reference: some ideas are useful for improving Internationalisation in DakarRelease (specially the forms thing)

See TranslationSupport instead.

-- AntonioTerceiro - 15 Jan 2006

Proof-of-concept for TranslationSupport

International Independent Information Exchange (Ciranda) is an effort to make a colective jornalistic coverture of the World Social Forum, by independent media colectives. This year, IIIE's organization is decided to move the software infra-structure that supports that to TWiki.

I am personally involved with this work. Since i18n and l10n are crucial to IIIE goals, I'm considering this as a proof of concept implementation of TranslationSupport, and I'll describe here issues that I found with this work. These issues will be a great help on TranslationSupport final specification and implementation. Some patches will be produced in the process, they will be added here as soon as they are ready.

Unfornatelly, this implementation is being done in a machine with too few output bandwith, and I can't advertise its addresss (which will make our work impossible). frown

Anyway, I'll summarize here the changes needed to implement Ciranda, as a starting point for core's changes for TranslationSupport:

Translation of interface elements with variables

Is working fine. Standards we have adopted:

  • Variables that are placeholders for localized content have a I18N_ prefix.
  • Variables that define localization for placeholder variables have L10N_ prefix.
  • Example:
    The word "title" is translated as follows:
    I18N_TITLE contains %VAR{"L10N_TITLE" web="%LANGWEB%"}%
    each translation web define L10N_TITLE as the textual translation of the english word "title"

TWikiForms i18n

Localized field values. We started trying to put variables (I18N_*) as field values. They worked OK for checkboxes and radio buttons, but variables didn't get expanded in select's. I've changed the code in the renderForEdit function (lib/TWiki/Form.pm) (since in view mode variables in form values get expanded normally).

Localized field names. We've tested using variables as field names. It works correctly in view mode (they get expanded as expected). But in edit mode they appear to the user unexpanded, and we expected them to be expanded (in the "text label", not the internals). To make it work, I've changed the _link function (in lib/TWiki/Form.pm).

IDEA! Note: changes only affect visual presentation of forms (internals were kept), and are in this patch (against 01Sep2004).

User language detection

As Ciranda needs to be avaliable in 6 differente languages, we had to think on a manner of allow changing language, without requiring the regular users ("readers") to register themselves. The solution we developed was to change SessionPlugin to allow a sticky LANGWEB setting, and to make this setting override globally-defined preferences (e.g. portuguese as being the global value for LANGWEB).

Here is a summary of the changes needed for this:

  • changed SessionPlugin to include a sticky language setting, using LANGWEB as a session variable. The changes made do SessionPlugin are in this patch.
    LANGWEB is set by passing its value, say, Portugues, as ?sticklangauge=Portugues.
  • to allow the SessionPlugin setting to override a preferences-defined LANGWEB value, we had to change the function handlePreferencesTags in lib/TWiki/Prefs.pm: this patch shows the changes made to that function.

Image galleries and file attachments

In the first day of the, it would be very nice to have the possibility of attaching multiple files a time. This would be a great help to photographers, who have to upload dozens of images at a time.

Also, a couple of days before it we have to change SlideShowPlugin to limit the numbers of images shwon, to implement showing the first image on a topic as a front page of the topic. This was posted in ImageGalleryPluginDev .

-- AntonioTerceiro - 26 Jan 2004

Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatdiff Form.pm.diff r1 manage 2.6 K 2004-11-04 - 20:48 UnknownUser against 01Sep2004
Unknown file formatdiff Prefs.pm.diff r1 manage 0.8 K 2005-01-22 - 17:40 UnknownUser  
Unknown file formatdiff SessionPlugin.pm.diff r1 manage 4.6 K 2005-01-22 - 17:41 UnknownUser  
Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r6 - 2006-01-15 - AntonioTerceiro
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.