Skip to content

Instantly share code, notes, and snippets.

@Freso
Last active December 10, 2015 11:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Freso/4428921 to your computer and use it in GitHub Desktop.
Save Freso/4428921 to your computer and use it in GitHub Desktop.

Hello all,

I've been missing a "language" attribute for URLs for a while, as I'm frequently adding e.g. Danish reviews of release groups. This post is to discuss the feature and try to convince all the rest of you that it'd be nifty to have as well. Please chime in with questions and comments and suggestions!

Uses

Some use cases I see for this could be, once we actually launch a localised musicbrainz.org, to only show URLs based on locale (e.g., show English language links for English language locales).

This would also be something I'd want for MusicBottle - to only display links relevant for the language the person is browsing in (probably like "eng+mul+$sessionlanguage"). If a user is browsing in Danish, it's unlikely they want to read a review in Greek.

Obviously, for both these cases, it should be possible to get all links as well - but this is a "future use" of this feature, and details about that implementation isn't really relevant here.

Please brainstorm over other things where it would be nifty to know the language prior to fetching the page and reading lang/xml:lang (if the target even provides it - and reports it correctly(!)) from that. I'm sure there are more uses I haven't thought of yet. :)

Interface

I imagine the interface being rather similar to other language (and country) selectors around the site, e.g., for Works and Releases (and Artists).

Edge/corner/difficult cases

Corner cases would have to be discussed on the Style mailing list to figure out the proper way to deal with them. E.g. MySpace pages have the interface in multiple languages, but artist profiles are usually only in one or occasionally two (rarely more, but it happens) languages.

Official artist websites in 2+ languages could be marked as [multiple languages] as is requested of other parts of the site. However, see also the "Wishlist" section below.

  • Should they be listed using [multiple languages] or the language of the profile content?
  • In case of multiple languages in the site, should we use the same guidelines we currently use for releases - ie., use the dominant one?

Implementation considerations

As jesus2099 notes in the Jira ticket (see "Read more!" below), we'd start off with having a huge amount of null-language URLs. As reosarevok points out the same place, all Wikipedia (and BBC) URLs would be able to be set with a script.

Wishlist

It would be nice if we can set multiple languages instead of one and only one. This would help sites that are available in e.g. Danish and English to state so, instead of having to use [multiple languages].

Related in Jira:

Read more!

The ticket for this is, of course, in Jira: http://tickets.musicbrainz.org/browse/MBS-4988

Topic on forum: http://forums.musicbrainz.org/viewtopic.php?id=4002

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment