Forget Actions or anything from Filemaker for this, it’s a very simple thing to solve this way. Just imagine a structure, written in text, where you have a key and a value. The key would be the English filename and the value would be the French one. You can type it out like this, to make the association easy to see:
var rosetta = {
"english.html": "french.html",
"cheddar.html": "brie.html",
... etc ...
};
The rhythm is this: English filename in double-quotes, followed by a colon, followed by the matching French filename in double-quotes, followed by a comma. All but the last pair will end in a comma. (Modern browsers won’t care if the last one ends in a comma as well, but poor dear IE will have to lie down in a darkened room if it encounters that sort of thing.)
Do this in a plain-text editor, preferably one that will highlight the syntax (TextWrangler will – for free), so you can see if you forget a quote mark, or start and end with a different type of quote. If you only have 20 pages, this shouldn’t take you more than a few minutes to type out and proofread.
When you add a new set of pages, just append the new pairs to the end of the structure, always maintaining a single comma between each (colon-separated) pair. You can maintain all of this in an external JavaScript file, so you only ever have to type it once. The script will be appended to every page in your site using an Action.
If there is more than just the filename that is different between two pages – if there is a folder name or other part of the path that is different – then be sure to add that into the mix. The goal here is to capture the smallest point of difference between two URLs, not the entire http://server.com/folder/ prefix if that never changes between the two languages.
Once you have this typed out, please post it at Gist or Pastie and paste the link here. That will keep everything simple for us; we won’t need to worry if the Web interface is messing things up by trying to convert URLs into clickable links.
Walter
On Jul 30, 2013, at 12:18 PM, grantsymon wrote:
Walter,
so kind of you to keep trying with this.
There are 10 pages in both English and French, so 20 total. I add pages from time to time, but it’s not going to be more than a couple per year at the absolute most. The pages are paralleled Eng/Fr.
In my head, I imagine the only kind of coding I have any idea about, which is Filemaker Pro. In there I would build a simple script with a variable and an If/Then and attach it to a button. It would be very very simple. Sadly I have absolutely no idea how to achieve the same thing in FW … but I hoped there would be an Action to make it easy. Ho hum.
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options