Mixed language content

A few days ago I was wasting a few seconds on Facebook, scrolling down the newsfeed, and was suprised to see a short Japanese post, 「残念だな」, by someone I was pretty sure doesn't know Japanese. Upon closer inspection it turned out Facebook had translated their German post into the language my account is set to display. This made me very aware — for a moment — that the fact in which language something is written carries information. Why did they suddenly post in Japanese? (Well ... they didn't.)
If, let's say, a Chinese acquaintance of whom I know that they don't know any German sent me birthday whishes in German, then they went through the trouble of goolging for German birthday whishes, using Google Translate or asking someone. In a similar fashion I report of elevators saying 「本日はご苦労様でした」 at my lab — because they do so in Japanese. Other times using a word from another language is just more concise and feels more accurate. Instead of talking about "a type of bicycle with a front basked often used by mothers" or leaving out information and just writing "bicycle" I name the thing by its name and say 「ママチャリ」.

The obvious problem with this is that my recent blog posts only really make sense to people that can read English and — at least some — Japanese. This made me think about working with Accept-Language headers. Just parse what a user's browser tells me about their language capabilities and display content accordingly.

To figure out how I'd go about the display content accordingly part I googled "mixed language web content" and similar things. This yielded a lot of SEO articles saying DON'T!, a few W3C resources on how to mark and style parts of text depending on language and even an interesting looking book titled Language Mixing and Code-Switching in Writing. No solution though for my balancing act between information/authenticity and audience/intelligibility.

So, I played around myself and came up with this: ← if your browser tells me you understand Japanese you will just see 「例」, otherwise the word will have a grey-ish background and when you hover over it, it will display "example".
Best thing about them? They're purely done in CSS. :3 (See the code here.) On the server side of things it gets a little bit unaesthetic — sadly. I maintain the contents of this website in Markdown and extra stuff is added in after parsing. For mixed language strings I use the following construct <‌!-- mixlang:例:example -->. Not quite as concise as e.g. Markdown links but well ... HTML comments go through the parser untouched and then I built my small <span> matryoshkas. Writing a Markdown extention would be an alternative but I don't have the time for looking into that right now.

By the time this post goes live I will have gone through my backlog of posts and added in optional English translation for all non English strings. レンジでgood!

国立情報学研究所〔四〕

Month four — one thrid left; review:

Anki ok. Sport insufficient. Here's the interesting stuff:

  • general
    • 餃子 and stuff from オリジン found their way into my food routine
    • helped a crying little boy out in the street find his mum
    • witnessed the following manifestation of cuteness:
      3 small kids, two of them in bear costumes, waiting for the train with their mum
      announcement for the next train to come in a few minutes: 「...。この電車は10両です。」
      kids: 「10秒?10!9!8!...」
      but there was no train when they reached 0. :'D
    • was stopped by police for riding my bike at night without a light (mount is loose, I support it w/ rubber bands, that day the bands ripped on my way to work so I put they light in my bag); they were extremely nice — had a good chat
    • got the Dogen approved verification that my Japanese it about as good as that of a native first grader — was asked 「長いんですか?日本は」 by abovementioned policemen and the next day when getting my hair cut :3
    • saw a performance of the 東京都立青梅総合高等学校 和太鼓部 which was awesome
    • spent almost a week in Kyōto and two nights in Nagoya
    • the local sentō had a "chocolate bath" (cacao butter mixed into the water) around valentine's day which was geat ^_^
    • saw a few people from Matsuyama again while they were in Tōkyō
    • a bug I found* in Pokemon GO got some coverage by blogs/YouTube channels
      following how the story spread from a dedicated subreddit to more and more general sites was quite interesting — especially low effort "news posts" that got things wrong were amusing
      (*to be precise I found something that works on some devices and a fellow redditor found a variation that works on all devices)
  • at the institute
    • the conceptual stuff I mentioned last time is finally done and got some good feedback
    • was able to integrate learning a few neat new Flask related things into my work
    • stumbled upon a PhD thesis titled The Presentation of Self on a Decentralised Web — can I please take a week off from life and explore this?
    • got into and am getting back out of eating dinner somewhere close to work to then head back and work some more
    • the elevators say 「おはようございます」 at 8:26 a.m. — so maybe the interval is from 8 to 9?

Good times. More.

On to the next month!

国立情報学研究所〔三〕

Month three — halfway through; another review:

Anki wasn't that great (stats) but at least still better than in the first month — and I finally got around doing some badly needed maintenance on my deck. Apart from Japanese study, slow but steady progress across the board. Nothing to complain. :)

Again, an attempt to convince myself that I'm actually making good use of my time here:

  • general
    • was at a sentō on christmas eve; on the way back I heard a girl's voice from a near high-rise building 「サンタ様ー!来てくださーい!」 :3
    • was shocked to learn that Japan introduced compulsory wearing of seat belts for rear passangers in 2008 and there's no penalty for non expressway roads °_°
    • rode my bycicle to work, passed a ママチャリ and thought I heard a 「ウゥウゥウイッ!地震です!」 — but there was a kid on the back of the ママチャリ gaming away on some handheld console so I could've misheard some game sounds. Stopped anyway to see what happens — nothing happened so I concluded it was some game. Turned out it actually was an earthquake alarm.
    • saw the last Jedi
    • was in Niigata
    • had a very Japanese New Year with 紅白, 年越しそば, 雑煮, 初詣 and 駅伝 — sneaked in a German tradition with Dinner for One
    • watched the entire かるた名人・クイーン戦 live on ニコ動
    • visited the Tokyo Saitama flood prevention underground thingy
    • I'm finally getting back into sports after a 5 month break due to an injury
  • at the institute
    • had a bit of fun with face recognition and line detection (OCR)
    • doing a lot of very conceptual work at the moment
    • the elevetors sometimes say 「お待たせしました」 and 「どうぞお乗りください」

All in all, satisfactory. Oh and the constant feeling that I could/should do more is gone. (:

On to the next month!

«

27  26  25  24  23  22  21  20  19  18  17  16  15  14  13  12  11  10  9  8  7  6  5  4  3  2  1  

»