Content translation and language selection

93 views
Skip to first unread message

Seba

unread,
Jun 30, 2010, 7:59:16 AM6/30/10
to TiddlyWiki
Hi,

I need help with the translation. I would like to have all my tiddlers
translated in several languages and then be able to select the desired
language. So when people visit my site they can choose their prefered
language. How can I do this? Just the technical part, the translation
I can handle:)

thx

seba

Måns

unread,
Jun 30, 2010, 6:43:44 PM6/30/10
to TiddlyWiki
Hi Seba
Yann Perrin (fr) made a switch-language plugin some years ago :
http://dl.dropbox.com/u/3105342/TW/twkd.html#PolyGlotPluginDoc_en

However this plugin isn't compatible with TiddlyWiki ver 2.6

I see no reason why not to take a shot at building something similar
with different tools available from TiddlyTools.com (Eric Shulman's
pluginheaven)
As a startingpoint I would install TemplateTweak
http://www.tiddlytools.com/#TaggedTemplateTweakInfo and create custom
view and edittemplates for each language (set by tags)- all language
entries could be sections input into the same tiddler via different
edittemplates if you integrate Erics EditSectionPlugin
http://www.tiddlytools.com/#EditSectionPlugin in the ViewTemplates,
you might just skip making custom edittemplates because it lets you
edit individual sections, when in viewmode.

Another strategy is to install HideWhenPlugin http://mptw.tiddlyspot.com/#HideWhenPlugin
and set it up to hide different classes(languages for your purpose)
depending on tagvalues - in the "standard" ViewTemplate.

For switching between different languages (invoked by tagvalue) I
would definetely install Tobias Beer's CycletagPlugin to be able to
roll from one language to another, not having to write anything...
http://lastfm.tiddlyspot.com/#cycleTags NB: You'll need Eric's
inlineJavascriptPlugin to make it work

There are many, many more ways to do it - however these are some of
the Plugins I use every day -
I might give it a shot myself one of these days - summerholliday
etc...

Happy hacking

Regards Måns Mårtensson

Claudio Li

unread,
Jul 4, 2010, 9:46:50 PM7/4/10
to tiddl...@googlegroups.com
I've tried doing something similar. I marked each language with {{lang_name{}}} and then use CSS to hide text in specified language.

E.g. In [[TiddlerXX]], I wrote:
{{eng{
English goes here...
}}
{{chi{
Chinese goes here...
}}}


Say I want to show text in Chinese, I put in [[Stylesheet]]:
.eng {display:none}

I prepared two stylesheets which differ only in the line that selects the language to show. Then I used SwitchTheme plugin to switch between the stylesheets.

A problem with this way or working is when I do searching, no matter what keyword I use (Chinese, or English), The ENGLISH titles of tiddlers are shown. This is expected as there's nothing like an "alternative title" that can be added for each tiddler.

See whether any of you have idea on the search part...


--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To post to this group, send email to tiddl...@googlegroups.com.
To unsubscribe from this group, send email to tiddlywiki+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/tiddlywiki?hl=en.


FND

unread,
Jul 5, 2010, 2:34:20 AM7/5/10
to tiddl...@googlegroups.com
> A problem with this way or working is when I do searching, no matter
> what keyword I use (Chinese, or English), The ENGLISH titles of tiddlers
> are shown.

You could use transclusion:
{{en{
<<tiddler "foo [en]">>
}}}
{{zh{
<<tiddler "foo [zh]">>
}}}


-- F.

Tobias Beer

unread,
Jul 6, 2010, 8:50:35 AM7/6/10
to TiddlyWiki
It seems that a Multi-Language-TiddlyWiki is not quite something with
an "out of the box" solution.

Ideally, I'd want it to work something like that...

# define a default language and a content structure or hierarchy
# add or define all globally available languages
# ability to globally switch the wiki language
# have translations be tiddlers in their own right... not sections
** create translations starting from default language tiddler and have
them linked
** have fields indicating the tiddler's language and the translation
status (e.g.: 'todo', 'draft', 'final')
# ability to navigate from a default language tiddler to a translated
tiddler
** a dropdown in the toolbar in view mode to "view translation"
** a dropdown in the toolbar in edit mode to "open or create
translation"
** a button to jump from a translation to the default language version
# a table view listing all default language tiddlers
** with indicators as for existing translations and translation status
in all defined languages

No idea, which of these features would be needed for basic
functionality, which would have a simple implementation and which
would require a bulkload of work.


Thinking about this, it seems to me that besides TAGS and WIKILINKS,
there is a certain need to have something like SEMANTIC RELATIONS in a
tiddlywiki... meaning:

* to persistently link two tiddlers, e.g. "tiddler xyz in default
language" <> "tiddler xyz in french", regardless of any subsequent
name-changes
* to qualify the semantic relation, e.g. "has french version" <> "is
french version of"

...which would drastically facilitate the development of plugins
building on such semantically qualified relations.

By the way... right now, I don't see cycleTags to be vital in
developping a "simple localization" ...I'd personally prefer a
dropdown ...with cute flags.

Tobias.
Reply all
Reply to author
Forward
0 new messages