30

Earlier this year, I saw a post written by Pekka asking what the state of the nation was regarding localisation. Rob replied that localisation was creeping up Stack Exchange's list of priorities, but they were pretty busy.

Now, I saw this post and thought - hey wait, you should totally drop that and try jQuery. I'm actually being serious - I was looking at all of the Greasemonkey scripts floating around on Meta and on userscripts and thought - hang on, we could do rudimentary UI translation that way, and I think I can possibly manage to learn how to work this Greasemonkey thing.

So I started something - then Stack Overflow Careers got me a job, so I let it drift. French Language & Usage then entered beta, and I posted the link on meta over there and it has gained some interest, so I thought I'd post here with a call of volunteers.

A short version of what's over there:

  • UI translation is a big undertaking for anyone and given Stack Overflow has exploded into Stack Exchange, the team are pretty busy. Setting up a system for the communities to submit translations is going to take time.
  • A set of Greasemonkey scripts could be used to provide a template for "when the time comes". Clearly, this is a bit of a hack and every time Stack Exchange change their HTML template it's going to break... but the important thing is the language strings, which Stack Exchange will then have.
  • Big pages (FAQ for example) are harder. I didn't get that far ahead.
  • My JavaScript is rubbish. My French is OK, but not I'm not fluent and I make mistakes. I don't speak German. I'm also employed, studying part time, am a moderator and generally a bit busy, so I could do with some help!
  • We can have something to point more technical native speakers at for French Language & Usage and German Language & Usage.

So, any takers? We have a chat room to co-ordinate the effort between speakers of all languages if there is sufficient interest; alternatively I'll take suggestions for any other discussion medium you like.

(Yes, I know, this probably belongs on Stack Apps, but only 43 people have viewed my script and I assume about 37 of those are me crazily refreshing the screen to see if anyone noticed).

Any volunteers to help?

9
  • 1
    I'll have a look, I might be able to translate it to German (and maybe Esperanto). Commented Sep 5, 2011 at 21:41
  • 1
    We need a serious commitment from the devs to freeze the UI Commented Sep 5, 2011 at 21:46
  • OK. It was a joke Commented Sep 5, 2011 at 21:47
  • I'm sure there would be a bunch of takers, but I'd like to see SE have a much better (friendlier) approach to foreign languages before I bother contributing my time. It seems like they don't trust their own users and have to maintain tight control. I understand this will benefit others regardless, but given the unfriendly environment I wouldn't want to attract non-English speakers here in the first place.
    – going
    Commented Sep 6, 2011 at 2:14
  • 3
    Don't know if it helps at all, but I wrote something similar to this for StackApplet that works well at translating the web-based interface using JavaScript. You can find the file here. Commented Sep 6, 2011 at 6:10
  • @George: thanks. I'm trying to use it, but I'm not sure how it would work in a User script instead of a web page. Commented Sep 7, 2011 at 21:19
  • 1
    What, no Klingon? Oh wait, that already covers the SO userbase. :)
    – John C
    Commented Sep 10, 2011 at 14:32
  • @John: You are welcome to contribute a Klingon translation. Commented Sep 12, 2011 at 10:58
  • FL&U brought me here, and I would totally contribute for french. Chat room has been frozen for 314 days, nice number. How dead is this ? Commented Oct 17, 2012 at 6:48

2 Answers 2

6

Our prototype now supports both German and French, by using different dictionary files.

Usage

Install the user scripts into your browser. You need:

(We work on cutting this down to two scripts.)

In Opera, put them into a directory and configure that directory as your user script directory (Settings => extended => contents => JavaScript options => User Javascript directory).

In Firefox, install the GreaseMonkey addon (if you didn't already), then install these as user scripts (simply clicking on the file should give you the link). Install them in the order listed above, or afterwards reorder them in this order (the translation script needs to be last).

If you have multiple dictionaries (i.e. for different languages), the last one loaded (before the main script) will be used.

Contribute

  • If you know German or French, please test the script and report wrong translations.
  • It looks like we need translations of these images, or a way not to use these images (for the beta sites): sprite-sheet http://cdn.sstatic.net/Skins/sketchy/img/sprites-beta.png?v=2 sprite-sheet http://cdn.sstatic.net/Skins/sketchymeta/img/sprites-beta.png
  • In some cases the translations create a loss of functionality - these are bugs. Report them, and if you know some JavaScript, help us solve them.
  • Some parts of the sites are not yet translated - you are welcome to contribute code, or simply report what is missing.
  • Add translations to more languages. Japanese is most likely the most wanted, but we welcome any other languages. But we can not guarantee any stable interface yet (e.g. the translation keys might change).
  • At some times the translations take more space than the original, and this space is not available. Here we might have to adapt the CSS from our script to change some sizes.

Our code is hosted at GitHub - fork the repository, make modifications, and send a pull request.

5
  • The corresponding post on GL&U meta: Browser-Script für Interface-Übersetzung / Browser-Script for interface translation Commented Sep 10, 2011 at 14:39
  • For Japanese I've started a project at stackapps.com/questions/2978/…
    – cypher
    Commented Jan 21, 2012 at 9:45
  • 2
    I can't access your repository on GitHub. Is it closed?
    – Sasha
    Commented Feb 3, 2017 at 9:20
  • 2
    @Sasha Hmm, looks like the original repository from ninefingers (= the original poster of the question) disappeared. There still is my fork, I'm not sure how up-to-date it is. I would be surprised if it still works now, 5 years later. (The whole github account of ninefingers disappeared, the current same-named account was only created in 2014.) Commented Feb 3, 2017 at 12:01
  • 1
    Thanks. In case somebody else is looking for the same, there's also cyphr's Japanese localization. (As of 2017-02-03, it seems to work with minimal fixes, i.e. span#hlinks-custom->.topbar-links. However, I've not tested it a lot.)
    – Sasha
    Commented Feb 3, 2017 at 13:21
4

In my opinion translating via JavaScript is going to get messy and the results will not be satisfactory, as there are a lot of things you can't see (for example due to your reputation).

If we have devs support, then all we need is access to resource files (I presume .NET RESX) and a platform to manage the localization process and most importantly updates (which are very frequent). There are a few to pick from (including my company's).

I can surely commit to the Italian localization, but only if we get "official" support from Jeff & Co., otherwise it's really going to be very complex and surely inefficient (wasting everyone's time). Does anyone know the amount of words to translate BTW?

2
  • I suppose the problem is that quite some part of the server-side code is simply not made to be translatable - i.e. there are no resource files. But I could be wrong here, of course. Commented Sep 6, 2011 at 20:36
  • Of course it could be the case. Commented Sep 7, 2011 at 9:15

You must log in to answer this question.