SID-01013: Problem using TopicTranslationsPlugin
| Status: |
Answered |
TWiki version: |
4.2.4 |
Perl version: |
5.8.8 |
| Category: |
CategoryPlugins |
Server OS: |
Fedora 8 64bit |
Last update: |
15 years ago |
Dear all,
I'm running on a server, where we've got several wikis created and working without problems for a long time.
Now we need to convert one of those wikis to a multilanguage wiki (including some UTF-8 languages).
I searched on twiki.org and I found
TopicTranslationsPlugin as the best option.
I installed the plugin. I went to configure script to activate it but it didn't work. Then I saw this error at the log file:
TopicTranslationsPlugin" could not be loaded.
Can't locate
I18N/AcceptLanguage.pm in
@INC
The directory
I18N exists but it doesn't contain any
AcceptLanguage.pm.
I was reviewing
TopicTranslationsPlugin and Internationalisation documentation, and I installed several perl packages which seemed to be necessary, also restarting the web server, but the error persists.
Can anyone help me? Does anyone currently uses that Plugin inside a Twiki installation? Is there any other solution (available for a twiki installation) to build a multilanguage wiki?
Thank you very much,
--
DaniMolina - 2010-11-03
Discussion and Answer
Hello.
Just an idea. Use the
LANGUAGE var to detect the current language and include the corresponding topic. You could use this code in each topic (e.g
MyTestTopic).
%IF{"istopic '%TOPIC%_%LANGUAGE%'" then="%INCLUDE{%TOPIC%_%LANGUAGE%}%<div class='twikiHidden'>" else="<div>"}%
Default topic text if no language specific topic exists.
</div>
Then you have to maintain for each topic a
TopicName_xx topic for each language, where xx is the language code. That is
MyTestTopic_en,
MyTestTopic_es, etc.
Even though in system topics like
WebLeftBar,
WebTopBar, etc, most of the text is already translated by the
MAKETEXT function used in the templates, you can follow a similar approach. This case the "Default topic text..." section is not needed because you will ensure those topics exists and the system topic just contains
%INCLUDE{%TOPIC%_%LANGUAGE%}%
--
EnriqueCadalso - 2010-11-03
Good idea, thanks for sharing Enrique!
--
PeterThoeny - 2010-11-03
Great, Enrique. That's a nice (and, better, short) way to do it. Thanks!
But then,... how could the user change to another Language?
I mean, we're using the wiki variable Language in order to the user can watch the wiki topic in "his" language.
But we'd also like than the user can change into another language (and, let's say, that since then, the user watched the wiki in that other language). Is it possible?
I'm reading wiki doc about IF statements and I see no (easy) way to change the content of that variable. Maybe creating a form? (I'm working on it)
--
DaniMolina - 2010-11-04
Users can change the language using the dropdown list in the top bar. That change will change the
LANGUAGE var value. To see that dropdown list in configure script you must activate {UserInterfaceInternationalisation} option and select the languages you want to show in the dropdown list.
You could also create a default template (modifying
WebTopicEditTemplate) with a modified version of the code (user aware)
%IF{"istopic '%TOPIC%_%LANGUAGE%'" then="%INCLUDE{%TOPIC%_%LANGUAGE%}%<div class='twikiHidden'>" else="<div>"}%
<!-- PLEASE DO NOT REMOVE PREVIOUS LINE-->
Default topic text if no language specific topic exists.
</div> <!-- PLEASE DO NOT REMOVE THIS LINE-->
And also provide somewhere the links to create the translated topic. Something like this
[[%TOPIC_en][Create english translation]] [[%TOPIC_es][Create spanish translation]] etc.
--
EnriqueCadalso - 2010-11-04
I'll try... when I could solve a problem with the configure script ("Use of uninitialized value in substitution (s///) at (eval 41) line 23."), because I cannot enable the
UserInterfaceInternasionalisation.

It seems it was fixed on this Twiki release, but I'm gonna search on Twiki Support's page.
Thanks very much, Enrique. I'm also working on your suggestion.
--
DaniMolina - 2010-11-09
The "uninitialized value in substitution" error in cofigure is caused by a broken CGI module version, see
ARGPullingMyHairOutConfigureBroken.
--
PeterThoeny - 2010-11-09
Yes, I know, Peter,
But for this Fedora (8, 64bits), there's no update for nor CPAN perl package neither perl.
I'm trying to install perl 5.10 for Fedora (9) package but there are a large list of dependencies.... :-S
Anyway, thanks; I'm working on it.
--
DaniMolina - 2010-11-10
It worked!!
I installed a newer Perl release (5.12), some missing perl modules, and after activating Internationalisation on configure script, it worked fine. Thanks so much, guys!! I couldn't have done without your help.
Next step, defining the languages, the source (as Enrique suggested) and the content of the twiki.
Thanks again!
--
DaniMolina - 2010-11-17
I am glad it worked out! Happy TWiki'ing!
--
PeterThoeny - 2010-11-17
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.