"joker" domain / "joker" urls (LT Internationalization, Internationalisation)

TalkRecommend Site Improvements

Join LibraryThing to post.

"joker" domain / "joker" urls (LT Internationalization, Internationalisation)

This topic is currently marked as "dormant"—the last message is more than 90 days old. You can revive it by posting a reply.

1gangleri
Edited: Oct 25, 2010, 12:12 pm

Hi! Many topics have hardcoded LT site / language urls.

It would be a usefull feature if LT would redirect a / any "joker" domain "joker" urls to the domain the user is logged in. This would much help the LT Internationalization / LT Internationalisation.

Maybe the NULL domain should redirect to the users LT site.

example: ( to be continued ... )
http://librarything.com/topic/101144 would redirect to
a) http://www.librarything.com/topic/101144 for users logged in to LT in English
b) http://www.librarything.de/topic/101144 for users logged in to LT in German
c) http://ru.librarything.com/topic/101144 for users logged in to LT in Russian.
etc.

Regards Reinhardt

2brightcopy
Oct 25, 2010, 12:20 pm

When you say "Many topics have hardcoded LT site / language urls", what you really mean is that many USERS have entered the full site with domain name, I think.

Just wanted to clarify.

3ari.joki
Oct 25, 2010, 12:22 pm

Well, I use relative url:s. That is, I write <a href="/topic/101144"> for the hyperlink. Then the infrastructure takes care of building for the user a link within the domain where the user clicked.

4brightcopy
Oct 25, 2010, 12:30 pm

3> Yes, at that point your browser fills in the rest of the link. But often people (including myself) paste in the full link including a domain (after having copied the link).

Basically, if this was implemented what should be done is that LT would need to parse up the links of anything that looked like "<a href=('")?http://^/+\.librarything\.^/+/" and replace it with just "<a href=$1/".

So:

<a href="http://www.librarything.com/topic/101144">This is a link</a>

becomes

<a href="/topic/101144">This is a link</a>

This could be done pretty easily in a regexp replace. As long as you include that full pattern I had above, it probably wouldn't have any intended extra effects.

But frankly, I don't think it's a big enough deal to warrant spending time on it. I guess that might be because I only use the English site, though, and I don't have a full appreciation for how much it annoys those that don't.

5ari.joki
Oct 25, 2010, 12:39 pm

It is annoying, though. When I begin the day by logging on to the Finnish site, the first time I click on almost any link I am not taken to the link target; instead, I land on the login page for the main site.

Something else, of course, happens at times; I land on the login page of the German site instead.

6brightcopy
Oct 25, 2010, 12:51 pm

5> Well there you go. I forgot about LT's penchant for often making you log into every site when you try to visit it.

Maybe Tim will decide it's worthwhile enough to implement the replacing I outlined above. Or maybe he has a whole different way he'd rather do it.

7Nicole_VanK
Oct 25, 2010, 12:51 pm

While I almost exclusively use the English language site too, I still meet a lot of such links in the combiners group. Yeah, annoying is right...

8brightcopy
Oct 25, 2010, 5:51 pm

BTW, the idea occurred to me that "joker" is a wonky idiom translation for "wildcard."

It almost makes sense.

9Nicole_VanK
Oct 25, 2010, 5:55 pm

Yeah, it's a European idiom. Being European I hadn't even noticed, but that's it.

10brightcopy
Oct 25, 2010, 6:00 pm

Well, like I said, it almost makes sense. But here we wouldn't say "wildcard", we'd say "relative" urls versus "absolute" urls. A "wildcard" would be something more like "*.librarything.*", which is possibly what gangleri was trying to get at somehow.

11ari.joki
Oct 25, 2010, 6:05 pm

It all comes to requirement contra implementation. We are used to asking for a specific implementation. I'm saying that URL:s should be relative, gangleri is saying that URL:s should be masked with a wildcard. The underlying requirement is the same: clicking on a link should not take the user out of the language site the user is currently using.

12brightcopy
Oct 25, 2010, 6:07 pm

I must be missing something, because "URLs should be masked with a wildcard" makes no sense to me. I'm not saying I'm against it, I'm saying I don't even know what it's supposed to mean.

13ari.joki
Oct 25, 2010, 6:15 pm

It's kind of inverse to what is done with IP addresses. You might have an IP address 192.168.1.14 with a subnet mask 255.255.255.0 ; in a way you could say that with that masking only the final octet acts as a selector. With gangleri's wildcard masking, the differences between LT language versions are masked away. You regexp does this in a way; it masks away the subdomain and top-level domain to recognize librarything.

14Nicole_VanK
Oct 25, 2010, 6:17 pm

I think it is meant to mean that site language specific elements of the URL should be somehow filtered out (as you explained in #4)

15brightcopy
Oct 25, 2010, 6:25 pm

13> Right, I think we're saying the same thing. I was just confused because the way you presented it in 11 made me think you were talking about two different things. It's basically about saying "I see you typed an absolute LT url; I'm just going to do you a favor and turn it into a relative one for you."

I think it's really something that needs to be done to the message TEXT, as opposed to trying to do it in javascript in the browser. Down the later path is a lot more implementation hassles.

16Mr.Durick
Oct 25, 2010, 6:33 pm

(So, if I want to help out in my own little, barely significant way, what do I include? The virgule and everything else after "www.librarything.com?"

Robert)

17ari.joki
Oct 25, 2010, 6:34 pm

Even after years and years of writing system specifications and managing user requirements, I constantly need to remind myself that it is always better to describe the effect I want, not how I think it might be achieved. In this case, it seems to me that the requirement is "clicking on a link should not take the user out of the language site the user is currently using", and the implementation (if any) could very well be what you describe.

18ari.joki
Oct 25, 2010, 6:39 pm

>16 Mr.Durick:, yes, Robert, although it means that you need to build the hyperlinking by hand instead of simply copy-pasteing the contents of the browser address box. The <a href=" needs everything starting with the first (is virgule a little virgo?) '/' after the librarything.

19brightcopy
Oct 25, 2010, 6:39 pm

17> Yup, I think it would be. Mainly I'm just trying to point out that there's an easy way of implementing it to avoid Tim (who might be pressed for time) passing it over as not worth the effort. Of course, now that we're 18 messages into the thread, he might just pass it over as not being worth the time to read all the messages. ;)

16> Yeah, to do it now without some kind of code change will be a little bit of a hassle for many users. Right now, LT automatically makes links when you post one without any special html stuff. Like:

http://www.librarything.com/topic/101144

But if you leave off the first part, it'd just do this:

/topic/101144

Which doesn't get automatically turned into a link. So you'd need to write out the html yourself:

<a href="/topic/101144">This is my link</a>

Or

<a href="/topic/101144">/topic/101144</a>

It's a bit more complicated to do, and not surprising then that most people don't do it. A solution that had the LT code auto-adjust it for you (including in links made automatically) would make it much more painless.

20Mr.Durick
Oct 26, 2010, 2:56 am

Thanks, ari.joki and brightcopy. I use a coded hyperlink as often as I just paste in the whole URL. I think I can paste the URL into the a href thing and delete the earlier stuff. I could've been doing it all along, but I was afraid I'd get it wrong. I'll try it, and if it is ever announced that it is taken care of automatically I'll stop.

Robert

21gangleri
Edited: Oct 26, 2010, 11:18 am

Sorry! I did not folllow the whole discussion. My original idea related to references to LT (not on LT pages alone).
I do not exactly know what an Apacher server does. I supose it will try to generate somthing meaninfull out of an url.
The idea is to use logg in information of the visitor (if available) and redirect to the most suitable (sub-) domain. (When posting the request I was not aware that I will be able to log in at different LT sites in the same time on some PC's.)
The first request suggested that the missing www should default to English LT. So nothing will be broken as the suggestion is aompatible with wahtever was done so far.
Thanks for the hint with relative urls (inside LT). I hope to use them in the future.

22jjwilson61
Oct 26, 2010, 11:28 am

An Apache server is just the open source version of web server. A web site in other words, although a web site could be composed of many servers.

23gangleri
Edited: Oct 26, 2010, 11:59 am

I noticed sumething stupid I did: Please see the "LT author search" link at http://www.librarything.com/author/singer . This link is "hardcoded" as http://www.librarything.com/search_author.php?q=Singer . It will not help at LT in other languages.

Unfortunatelly I can not recall where to find similar cases: google: "LT author search" site:librarything.com is not up to date ... available logs might help

24jjwilson61
Oct 26, 2010, 12:57 pm

Are you saying that the link for the author search on the author page for other language sites is hard-coded to the English-language site? I would think that that would be a bug.

25brightcopy
Edited: Oct 26, 2010, 1:17 pm

23/24> Yup, looks like that's what he meant. I bugged it here:
http://www.librarything.com/topic/101223

ETA: Actually, nevermind. It was just that someone had put an absolute link in there. I edited and changed it to

/search_author.php?q=Singer

and it worked fine on other language sites.

26jjwilson61
Edited: Oct 26, 2010, 1:42 pm

I see. It seems pretty odd for a member to add a link to LT in that section.

27brightcopy
Oct 26, 2010, 1:51 pm

26> Yes, but I think it makes sense in context here. The author "Singer" isn't a typical author, and it's likely you wound up there because you're missing an author's first name. So a search for all the authors named Singer might be helpful.

28TimSharrock
Oct 26, 2010, 2:33 pm

from 21>

If I understand you correctly, if I were to put on a blog, for example, a link to a work, if I put http://www.librarything.com/work/9302750 it would connect to the english language (.com) site, if I put http://www.librarything.de/work/9302750 it would connect to the german site, but if I put something special, for example http://yourlanguage.librarything.com/work/9302750 then it would redirect to whatever site the user happened to be logged in at (I presumably the .com if not logged in at all)

Is that what you would like?

Tim

29gangleri
Oct 26, 2010, 3:39 pm

>28 TimSharrock: Yes. The entry point to the site is librarything.com ; exceptions are librarything.de, librarything.nl and some other urls but not .ru, .il, .yi. So at the main entry point one could "redirect" to something else.
Questions:
How "efficient" and how "expensive" are such actions?
How complicated is the code?
Default would be www = English.

30brightcopy
Oct 26, 2010, 3:42 pm

30> I'd rather see the site move to having EVERYTHING under www.librarything.com, with a simple toggle switch that let you set your current language.

31gangleri
Oct 26, 2010, 5:33 pm

>30 brightcopy: No objections; one could redirect whatever (historical) LT url to anyting. The WikiMedia sites are changing the user interface language via &uselang=foo foo is any antry from http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/languages/Names.php?view=...

One can overwrite the use of the default language, the use of the language set up in preferences etc.

32auntSteelbreaker
Oct 26, 2010, 10:26 pm

@30

Yes, that would make a lot of more sense. The current system is kind of a joke.

33gangleri
Oct 27, 2010, 5:48 am

>31 gangleri: To be more specific. Today a high percentage of users may use the LT in English only. Other users may work in their native language. Seen of a different perspective maybe less then 1% of refference links relate to LT pages in other language.

The "nice to have" would be
a) language independent refferencing; this was the original request
b) refferencing to a LT page as seen in a certain language (this are the special cases); this could be done via a language parameter (as described @31)

34gangleri
Oct 27, 2010, 9:22 am

FYI: It wuould require some stability testing:
/search.php?q=Linder%2C+Isaak&f=22&exact=1
generates different links at:
a) http://librarything.com/commonknowledge/search.php?q=Linder%2C+Isaak&f=22&am... (without www or other subdomanin)
b) http://www.librarything.com/commonknowledge/search.php?q=Linder%2C+Isaak&f=2... (www)
- - - -
a) generates search.php?q=Linder%252C+Isaak&f=22&exact=1

Note: No clue where the "Touchstone" comes from.

35jjmcgaffey
Edited: Oct 31, 2010, 9:44 pm

Square brackets around anything makes a touchstone in Talk - use the HTML code & #091; and & #093; (without the space after the &) instead of just typing [ ]. Or use something else instead of square brackets - curly brackets are usually good substitutes (assuming they're easily reached on your keyboard) {}

36gangleri
Nov 10, 2010, 7:55 am

re >34 gangleri: Note: No clue where the "Touchstone" comes from.
>35 jjmcgaffey: Thanks for the answer. Unfortunatelly I do not recall what exactly the generated Touchstone. I did not expect any. It apeared during editing. Maybe this was fixed in the mean time.
----
FYI: http://www.librarything.com/topic/102159

37gangleri
Mar 19, 2012, 8:12 am

please see also /topic/134432: add LT language subdomain selelctor at /editprofile/friendfinder

38gangleri
Apr 7, 2012, 3:53 pm

Please see: /topic/135515 "predefined LT catalogs and their localized url substrings - see Profile (/profile/*)"