Multilanguage TiddlyWiki - Any existing resources?

Tell me about it. My mind is racing with possibilities. Even simple things like side-by-side editor, left side for “text” field, right-side for choice of editing any other field in the tiddler with a textarea instead of the default input fields.

And I’m thinking in a node.js setup, one TiddlyWiki for authoring all of the possibilities (of whatever), which can be used to publish versions.

Sticking to multilingual scope, could have one TiddlyWiki for editors and all languages, and when ready to publish, have a process to export for each individual language.

Something like that.

Just a progress report, printout of noteworthy stuff in attached PDF. Crap, PDF not allowed. (interlude …)

  • A few tweaks aside related to modified version of $:/core/ui/EditTemplate/body/editor
  • I’ve come to the tentative conclusion that I am going to treat alternative tiddler titles as language-related aliases, but only for-display aliases, not for-typing-links-using-aliases-as-alternatives-to-tiddler-titles.
  • I’ve also decided that it is a bad idea to use TiddlyWiki’s default title and default text field as fields for the default language. (Say a TiddlyWiki is delivered to somebody with English, Spanish, and French, and the person decides to lighten the load by getting rid of English text and just keeping Spanish and French. Hard to do when English was entered in the standard TiddlyWiki title and text fields. Seems to me. Much easier to say: “hey, get rid of all title-en-GB and all text-en-GB fields.”)

Cheers !

Attachments:

Okay, images:



Code for modified $:/core/ui/EditTemplate/body/editor tiddler (nothing fancy, just good-enough for prototyping’s sake):

<$list filter="[[$:/state/showeditpreview]get[text]match[yes]then<currentTiddler>] [<currentTiddler>fields[]regexp[text-]count[]match[0]then<currentTiddler>]">
<$edit

  field="text"
  class="tc-edit-texteditor tc-edit-texteditor-body"
  placeholder={{$:/language/EditTemplate/Body/Placeholder}}
  tabindex={{$:/config/EditTabIndex}}
  focus={{{ [{$:/config/AutoFocus}match[text]then[true]] ~[[false]] }}}
  cancelPopups="yes"
  fileDrop={{{ [{$:/config/DragAndDrop/Enable}match[no]] :else[subfilter{$:/config/Editor/EnableImportFilter}then[yes]else[no]] }}}

><$set

  name="targetTiddler"
  value=<<currentTiddler>>

><$list

  filter="[all[shadows+tiddlers]tag[$:/tags/EditorToolbar]!has[draft.of]]"

><$reveal

  type="nomatch"
  state=<<config-visibility-title>>
  text="hide"
  class="tc-text-editor-toolbar-item-wrapper"

><$transclude

  tiddler="$:/core/ui/EditTemplate/body/toolbar/button"
  mode="inline"

/></$reveal></$list><$list

  filter="[all[shadows+tiddlers]tag[$:/tags/EditorTools]!has[draft.of]]"

><$list
	filter={{!!condition}}
	variable="list-condition"
><$transclude/>
</$list></$list></$set></$edit>

</$list>

<$list filter="[[$:/state/showeditpreview]get[text]match[no]then<currentTiddler>fields[]regexp[text-]first[]then<currentTiddler>]">
<div style="display:table;; width:100%;">
 <$list variable="thisLanguage" filter=" [[$:/languages/en-GB]] [plugin-type[language]sort[description]] ">
<div style="display:table-cell; border:2px solid purple;">
<details open><summary>
<$text text={{{ [<thisLanguage>get[description]] }}}/>
</summary>
<$edit-text field={{{ [<thisLanguage>split[/]last[]lowercase[]addprefix[alias-]] }}} class="wide100"/>
<$edit

  field={{{ [<thisLanguage>split[/]last[]lowercase[]addprefix[text-]] }}}
  tag="textarea"
  class="tc-edit-texteditor tc-edit-texteditor-body"
  placeholder={{$:/language/EditTemplate/Body/Placeholder}}
  tabindex={{$:/config/EditTabIndex}}
  focus={{{ [{$:/config/AutoFocus}match[text]then[true]] ~[[false]] }}}
  cancelPopups="yes"
  fileDrop={{{ [{$:/config/DragAndDrop/Enable}match[no]] :else[subfilter{$:/config/Editor/EnableImportFilter}then[yes]else[no]] }}}

><$set

  name="targetTiddler"
  value=<<currentTiddler>>

><$list

  filter="[all[shadows+tiddlers]tag[$:/tags/EditorToolbar]!has[draft.of]]"

><$reveal

  type="nomatch"
  state=<<config-visibility-title>>
  text="hide"
  class="tc-text-editor-toolbar-item-wrapper"

><$transclude

  tiddler="$:/core/ui/EditTemplate/body/toolbar/button"
  mode="inline"

/></$reveal></$list><$list

  filter="[all[shadows+tiddlers]tag[$:/tags/EditorTools]!has[draft.of]]"

><$list
	filter={{!!condition}}
	variable="list-condition"
><$transclude/>
</$list></$list></$set></$edit>

</details>
</div>
</$list>
</div>
</$list>
2 Likes

For Future reference the title of this Topic is not friendly, the following is generic

Is there any resource in TiddlyWiki that helps me to create a

Before we actualy see the subject

multilanguage TiddlyWiki?

So almost every where I see it listed I have no idea what it is about.

Consider reworking to put the subject first, and titles can be “simplified”

Multi-language TiddlyWiki?, Help and resources?

I did change the title of the thread.

1 Like

As part of the process, I assume folk who edit somebody else’s post or discussion title let the original poster know that the edit was done and why it was done, right?

2 Likes

@Rafael I did just publish 2 new plugins. The Field Visibility and the Field Editor plugin. Both of them can be used to create a setup very similar to what you described.

The video, how the plugins can be used is here: Field Editor & Field Visibility Plugin - YouTube

have fun!

4 Likes

Some nice Ideas here Mario. Some of which can go a lot further and address other issues elegantly. Great use of video too.

Love your work

@Rafael … Did you test anything posted here? … Are you still listening?

@pmario

I posted on your Youtube video as well, but I wanted to thank you for this plugin. It’s extremely useful.
I had one quick question about referencing Tiddlers in Tiddlers.
I’m using the “@details” plugin and trying to do this kind of reference. But it doesn’t respect my currently selected field. Is there a way to force the field when referencing a tiddler? Again, I know this is early so if it’s impossible, I totally understand. Thanks again for making such a great plugin!

<$details summary=“Details Header”>

{{SeparateTiddlerPage}}

</$details>

@KTallguy I think it’s possible to create a template, that also respects the active-field setting. The transclusion with the $details widget would look like this.

<$details summary=“Details Header”>

{{SeparateTiddlerPage||fieldTemplate}}  or {{SeparateTiddlerPage||§}} //if you use the shorter name for the template

</$details>

Create a tiddler named: fieldTemplate with the following text. … You can use a shorter name for the template, to have less to write eg: § or something similar.

<$set name=Field value={{{ [{$:/config/wikilabs/viewtemplate/body/field-config}get[text]trim[]!match[text]] }}}>
<$transclude field={{{ [all[current]has<Field>then<Field>else[]] }}}>

<$transclude>

</$transclude>
</$set>

Thank you for your reply.
And amazing! I tried it and it worked.
On the “fieldTemplate” tiddler, this message displays, but the functionality seems fine.
"Recursive transclusion error in transclude widget"

Thanks again for the solution! :slight_smile:

Right gents, so how does the casual user install this feature? I am loving it!

Hi J,
There is a separated intro-thread at: [Intro] Field Editor Plugin where I also linked a video.

The field visibility plugin intro is at: [Intro] Field Visibility Plugin … BUT there is room for improvement.

I just know Multiline Field Editor Plugin can be used to make doc wiki have multiple language!

This will be very useful.