[Seeking Ideas] Issues with a TW in four languages ...

185 views
Skip to first unread message

TiddlyTweeter

unread,
Jul 12, 2021, 1:45:22 PM7/12/21
to TiddlyWiki
This is merely an early query. I need some ideas on an efficient approach to the following problem ...

AIM: Put on-line the 54 images of "LIberty" by Angela Weyersberg in a self contained gallery.

THE CASE: Each image of a painting has FOUR language variations for its legend (English. Italian, Slovenian, German) FYI, the variants are held in fields of each image tiddler.

THE PROBLEM: HOW do I in TW (1) Establish the language to invoke on startup? (2) enable language switching?

I realised the specific issue is not gonna be solved by the "lingo mechanism" as is,  as in this particular case, its not UI buttons in contest but actual content.

I HOPE this is clear!

At the moment I'm simply need some ideas about how to move forward.
ANY ideas are most welcome
TT

PMario

unread,
Jul 12, 2021, 2:22:07 PM7/12/21
to TiddlyWiki
Hi,
I was working on multi-language plugins. So the texts could be language-plugins which switch with the language. ...

The problem I have atm is, that the plugin import dialogue wikitext is frustratingly complicated, which slows down the progress quite a bit.

-mario

TiddlyTweeter

unread,
Jul 12, 2021, 3:45:52 PM7/12/21
to TiddlyWiki
Ciao PMario

Thanks for your reply.

I can maybe rephrase part of it. 

            Q: Could I use the "info" plugin to feed "start-up" actions to establish which country/language the wiki is being opened in?

Just a stab in the dark! :-)
TT

TW Tones

unread,
Jul 12, 2021, 7:49:26 PM7/12/21
to TiddlyWiki
TT,

I agree it would make sense for this info to appear in the $:/info mechanism but I think there may be other ways. 

The html document itself supposed to declare the language as here https://www.w3schools.com/tags/ref_language_codes.asp and browsers do maintain the language settings as we move around the internet. This would include country codes https://www.w3schools.com/tags/ref_country_codes.asp.

I just point this out as it would seem the css html model should allow this information to be found.

Regards
Tones

Charlie Veniot

unread,
Jul 12, 2021, 8:19:05 PM7/12/21
to TiddlyWiki
G'day TT,

Silly question: do you mean find out language setting chosen in TW, or do you mean language setting for the browser?

TiddlyTweeter

unread,
Jul 13, 2021, 6:06:15 AM7/13/21
to TiddlyWiki
Ciao cj.v

It is not a silly question. It is helpful. Forces me to clarify.

The situation is I have a gallery of 50+ images that each tiddler for has four language fields for (German, English, Slovenian, Italian).

What I am trying to sort out is WHETHER I should use BROWSER detection of run context (which in TW ALSO means we can use [to a great extent?] the "Info" plugin to ease its use) OR simply provide end users with a button on startup to change what is shown.

This is NOT really an issue about using the brilliant TW "lingo system" because that relates most to UI elements. In the gallery those are MINIMAL and it is not the issue.

I am beginning to think I could use CSS to only show one language at a time?

Thankyou for your question! It pushed me on.

Best wishes
TT

TiddlyTweeter

unread,
Jul 13, 2021, 6:12:45 AM7/13/21
to TiddlyWiki
Ciao Tony

Thanks for your comment. Declaring the language in the <HTML lang="OZ"> won't help as what we have here is a MIXED language scenario. One wiki, four languages.

I'm trying to work through whether any kind of "online status detection" would actually work, or whether (looking more likely now after some useful comments) I simply need the user to click a language choice on open?

But it is still all tentative.
Best wishes
TT

Charlie Veniot

unread,
Jul 13, 2021, 9:10:14 AM7/13/21
to TiddlyWiki
G'day TT,

If adding language plugins and using TW's language button make for an alright solution,  then checking the value of $:/language makes for an easy way to set context based on currently selected language.

It should be easy enough to show the language button anywhere you need it for the sake of convenience.

Then just a matter of showing image labels based on currently selected language.  something like:
 <$text text={{{ [[$:/language]get[text]regexp[fr-FR]then<currentTiddler>get[field-fr-fr]] [[$:/language]get[text]regexp[en-GB]then<currentTiddler>get[field-en-gb]] }}} />

Screenshot 2021-07-13 9.55.44 AM.png

Télumire

unread,
Jul 13, 2021, 11:38:03 AM7/13/21
to TiddlyWiki
Hello TiddlyTweeter,

Expanding on cj.v elegant solution, you can also use a select widget if you dont want to download a language plugin :

<$select tiddler="$:/language">
 <option value="fr-FR">fr-FR</option>
 <option value="en-GB">en-GB</option>
</$select>


 <$text text={{{ [[$:/language]get[text]regexp[fr-FR]then<currentTiddler>get[fr-fr]] [[$:/language]get[text]regexp[en-GB]then<currentTiddler>get[en-gb]] }}} />

Online demo : https://telumire.github.io/TW-tips/#Conditional%20display%20based%20on%20language%20setting

Charlie Veniot

unread,
Jul 13, 2021, 12:01:44 PM7/13/21
to TiddlyWiki
Being a bilingual French-Acadian Canadian, and liking stable interfaces, I rather like that idea of just having captions switching language context and everything TiddlyWiki not shifting.

Aside and totally unrelated (well, totally intertwingled to me...)

Although I don't speak "chiac", I appreciate it something silly.  For a laugh to those who do speak French, check out the mockumentary:  Le Chiac est la solution
  • "J'ai crossé la street." - CAREFUL ! 
    • "crossé" is pronounced as per the English word "cross" followed by the French "é"
    • "crossé", pronounced entirely in French, is a vulgar word.  Fun, but vulgar ...
      • years ago, a unilingual anglophone at the office, in the process of learning French, caused a bit of an uproar using the full French pronunciation of "crossé", so funny

TiddlyTweeter

unread,
Jul 13, 2021, 12:07:09 PM7/13/21
to TiddlyWiki
...  check out the mockumentary:  Le Chiac est la solution

C'est merveilleux. Vous êtes bricoleur?
TT 

TiddlyTweeter

unread,
Jul 13, 2021, 12:17:09 PM7/13/21
to TiddlyWiki
Ciao Télumire

Thanks for that! It practically shows a way I could get what I need. 
Kudos!

Best wishes
TT

TiddlyTweeter

unread,
Jul 13, 2021, 12:51:04 PM7/13/21
to TiddlyWiki
Ciao Cj.v  

I like very much love  Agnès Varda's documentary THE GLEANERS & I 
Gleaning & Bricoleur activities seem to me fundamental to best use of TW :-)

French is actually a good language to appreciate TW in.

Best wishes
TW

Charlie Veniot

unread,
Jul 13, 2021, 2:16:10 PM7/13/21
to TiddlyWiki
Ste mockumentaire-là, cé pas moi qu'a faite ça.  Chui y'inque un regardeux. 

Mais, personalité, on pourrait, en tchèque-sorte, me dire un bricoleux (bricoleur), un brin patenteux (patenteur), pis à m'ouère (vouère, voir) un vrai piocheux (piocheur)  à cause que ma caboche pioche tou'l'temps: analyse par paralyse!

Le français standard/normé parlé, c'est comme le plus beau chant d'oiseau.  Mais cé pas mon mouèneau (moineau)...

Charlie Veniot

unread,
Jul 13, 2021, 2:40:07 PM7/13/21
to TiddlyWiki
I must watch that gem!  Looks fantastic.  Now, where to find it ...

For sure.  I wish I had time to learn other ones.  My hobby involves digging into dictionnaries of old French and various patois, all pre-20th-century books in Google Books.  Not enough hours in a day.



TiddlyTweeter

unread,
Jul 14, 2021, 7:19:20 AM7/14/21
to TiddlyWiki
ONE issue came up, askance of the OP ...

WHAT you gonna do if the language is not supported?

In my region (North East Italy) SLOVENIAN and FRIULIAN are used everyday.

Slovenians watch a lot of English TV so its a lesser issue as most of the younger generation know English already.

Side comment
TT

Charlie Veniot

unread,
Jul 14, 2021, 9:27:40 AM7/14/21
to TiddlyWiki
Well, if choosing language is based on language plugins, then you're kind of stuck.  Unless you develop additional language plugins?

Going with Télumire's idea, you can just keep adding language options to that drop-down-selection box as needed.  This is great if you intend on just picture labels changing language.  This is not so great if you intended on the TiddlyWiki interface to also change language.

Maybe you will need both approaches?  The TiddlyWiki plugins for languages (for the TiddlyWiki interface), and a dropdown box for languages of labels on your pictures?

So somebody who speaks Friulian will need to pick the TiddlyWiki interface language he/she understands the most, but then at least have the option of choosing Friulian for the labels on your pictures.

TiddlyTweeter

unread,
Jul 16, 2021, 3:22:10 AM7/16/21
to TiddlyWiki
UPDATE ... thanks all, as well as Jeremy in another thraed, for your comments, all of which were helpful.

Just FYI, I asked around locall (North East Italian) art people, who are the major target.
I became very clear that most of them are at least bilingual. 
SOME of them would want all four languages showing since it would help them understand what the particular painting is about.

SO, my current thinking is to use TW REVEALS, or maybe CSS hiding, to only show ONE language IF the user presses a language flag. 
Otherwise captions would be shown in all four languages.

Best wishes
TT


TW Tones

unread,
Jul 17, 2021, 7:44:19 PM7/17/21
to TiddlyWiki
TT,
A passing thought on languages. Perhaps a version of the excise tool that replaces selected text with a transclusion and using a template. Lets say English is the authors primary language.

ie; This is a statement in English
becomes {{thestatement||multi-language}}
  • What actually happens in the excised text is placed in say $:/lang/english/thestatement 
  • and the template multi-language will link to or render the content therein where ever the transclusion is used, it will look for a tiddler in the current language first eg:  $:/lang/french/thestatement and retrieve the translated text.
    • If a translation does not exist retrieve the primary text and highlight the fact there is no translation (click to add)
  • Then a tool that lists all English (or other primary lang) versions alongside the other language's there in would allow a translator to read through only text that needs translation.
  • If designed correctly anyone could take the wiki, change the language to theirs and if no or poor translations exist add and change then send a json file of their language tiddlers to the author for inclusion.
    • Language tiddlers could have their own notes, links back to where they are transclude (one or more), and caption equivalents of the primary tiddler name.
Of course the above idea should use appropriate naming standards to map to the existing language tools.

It may take a little research to find how to use such transclusions in different parts of wiki code, but you may use different namespaces for button text, macro text etc... to aid translation and design.

Perhaps a wiki could be developed in the primary language and after publishing in the primary language (initial testing) one could go through systematically in introduce the language transclusions, however doing this from day one, even if only one language is in use may be better. I would then consider a "translator mode" that when active provides tools for language review and additions to each "language transclusion" eg; link to edit, languages available, select language to edit etc... I think it helps if a translator can review the content in which the text is, that they need to translate, so a form of backlinks should be available.

Regards
Tones

Reply all
Reply to author
Forward
0 new messages