On Monday, February 24, 2014 6:27:58 AM UTC-8, Joe Shirk wrote:
>
> Now that I want to add the English version, I thought it would be best to 
> put an [[EN]] link in the SiteSubtitle that swaps the SiteSubtitle for one 
> with links in English to tiddlers in English (that includes a link to 
> switch it back to Portuguese). I don't know how to do that.
>
> To make matters complicated, the current default is the Portuguese but now 
> I would rather make the English version the default. What needs to be done 
> to accomplish this?
>

Here's a quick way to achieve the results you want:

1) Create a tiddler called [[SetSiteSubtitle]] with the following HTML 
content:
------------------------------
<html><input type="button" value="$1" title="$2" style="cursor:pointer" 
onclick="
   store.setValue('SiteSubtitle','text','<<tiddler SiteSubtitle$1>>');
"></html>
------------------------------

2) Create [[SiteSubtitleEN]] containing:
------------------------------
This is in English <<tiddler SetSiteSubtitle with: "PT" "Change to 
Portuguese">>
------------------------------

3) Create [[SiteSubtitlePT]] containing:
------------------------------
Isto é em Português <<tiddler SetSiteSubtitle with: "EN" "Mudar para 
Inglês">>
------------------------------

4) Set the content of [[SiteSubtitle]] to transclude the desired default, 
like this:
   <<tiddler SiteSubtitleEN>>

That's it.  You should now be able to toggle between the two alternative 
SiteSubtitleEN and SiteSubtitlePT definitions with a single click!

enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios

YOUR DONATIONS ARE VERY IMPORTANT!
HELP ME TO HELP YOU - MAKE A CONTRIBUTION TO MY "TIP JAR"...
   http://TiddlyTools.github.com/fundraising.html#MakeADonation

Professional TiddlyWiki Consulting Services...
Analysis, Design, and Custom Solutions:
   http://www.TiddlyTools.com/#Contact

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to