I am trying out the Books Search plugin for Obsidian. I keep notes on all books I’ve read, own or have come across. I add meta data to those notes manually. The Books Search plugin helps make that easier by picking up that meta data from Google Books through their API. You install the plugin through the Community Plugin list, and can then add an API key. Without that key, after a few tries you will get an error message.

The plugin documentation does however not state how to connect the plugin to that Google API.

These are the steps I took after a bit of searching:

  • In the Google cloud console first create a project. (A Google account is needed)
  • In the same console, under credentials, click create credentials and create an API key. Copy that key and save it in the settings of the Obsidian Books Search plugin.
  • In the same console, under Enable APIs & Services, enable the Google Books API.
  • Go back to Credentials, edit your API key, select Restrict Key under API restrictions, and select from drop down list the Google Books API you’ve just enabled. (If it doesn’t show any APIs to choose, you have not enabled any APIs yet.) Now the key works only for the Google Books API.
  • Ignore the warning in the console about OAuth consent, as this is not needed (the books API is accessible without authorisation, and you’re also not building an app for others to use.)

Using the Book Search plugin I notice it is by default restricted to English books, not finding titles in other languages that Google Books does have in its lists. The locale settings in the plugin allow me to switch language before a search in the search form through a very long drop down menu, but doing that (or doing the same search for each of three or four languages) quickly negates the effectivity gain the plugin provides.

It is unclear from the Google API documentation if locale can be set to multiple languages.

Probably not, given Google’s long history of interpreting multilingual as serial monolingual (see this 2007 presentation at Google by Stephanie Booth pointing this same stuff out), ignoring that multilingual people tend to change languages throughout their activities even for just a single word or short phrase. (I don’t have Dutch, English or German days or topics, in the case of books I may want to find the German original of an English translation, or want to search for a specific thing in French because I know it exists, while also interested in any Dutch translation that might be available or the Italian original. My notes are always in multiple languages.)

In Antwort auf Sprachwechsel in WordPress von Robert Lender

Die Sprachauszeichnung von Textausschnitten in WordPress zu ändern, ist in der Tat schwierig. Ich mache das immer manuell. Sprachunterstützung scheint generell davon auszugehen, dass man immer nur eine Sprache verwendet, oder wenn man die Sprache wechselt, dass man immer nur eine Sprache zugleich verwendet. Der Gedanke, dass man zwei oder mehr Sprachen austauschbar verwenden kann scheint unvorstellbar zu sein. Ganz zu schweigen davon dass man dies innerhalb eines einzigen Beitrags tut oder dass man ein einziges Wort oder einen kurzen Satz in einer anderen Sprache verwendet als in denen man normalerweise schreibt.

Die Einstellung einer Sprache in WordPress ist eine seitenweite Einstellung. Das manuelle auszeichnen der Sprache ist der einzig zuverlässige Weg.

Damit ist es aber noch nicht getan. Wenn man sich ansieht wie z. B. Google Translate Inhalte analysiert, wird es schnell merkwürdig. Google achtet nur auf die für die ganze Webseite angegebene Sprache und berechnet eine algorithmische Wahrscheinlichkeit bez. die Sprache des Textes. Alle anderen Sprachauszeichnungen werden einfach ignoriert. Und selbst dann liegt Google oft falsch. Wenn ich auf einer individuellen Page, die als niederländisch deklariert ist, einen kurzen Beitrag auf Niederländisch schreibe, wird er trotzdem als Englisch interpretiert, weil die Menüstruktur auf meinen Seiten auf Englisch ist und mehr Gewicht zugewiesen bekommt als der Text selbst. Nur wenn es einen längeren niederländischen Text gibt, wird der Beitrag trotz korrekter Sprachauszeichnung der kürzere Texte, korrekt als niederländisch erkannt.

Vor einiger Zeit habe ich mein WordPress-Theme so angepasst, dass es Sprachen besser berücksichtigt:

  • Wenn ein Beitrag auf Deutsch oder Niederländisch ist, und einzeln betrachtet wird, wird die richtige Sprache als Sprache für die ganze Webseite angezeigt.
  • Wenn ein Beitrag auf Deutsch oder Niederländisch ist, wird er in einer Übersicht zusammen mit englischen Beiträge mit einer Sprachauszeichnung auf Post-ebene versehen. Beides mache ich, indem ich für jede Sprache eine eigene Kategorie verwende.
  • Kurze Sätze in einer anderen Sprache markiere ich mit einer Sprachauszeichnung, die ich leicht mit einer Tastenkombination hinzufügen kann.
  • In meinem RSS-Feed füge ich Links zur Maschinenübersetzung deutscher und niederländischer Beiträge ins Englische hinzu, erstelle sie aber als spezifische Links: Man kann sich nicht darauf verlassen dass die automatische Erkennungsfunktion von Google Translate dies richtig macht.

Kurz gesagt, ich bin nicht zuversichtlich, dass WordPress es richtig machen wird. Diese Diskussion ist kein neues Phänomen, und ein branchenweites Problem in der Tech Industrie. Vielleicht sollten gerade Coder in Europa mit unserer Sprachenvielfalt sich auf ein gut funktionierendes WP Plugin konzentrieren.

Die Auszeichnung des Sprachwechsels ist eigentlich keine Kleinigkeit. Denn immerhin geht es darum, dass z.B. Screenreader sehbehinderten Menschen Wörter richtig vorlesen und diese somit überhaupt verständlich sind. .[Was man] bis heute für einzelne Worte nicht machen kann. …da hoffe ich in Zukunft auf mehr Einsicht bei den WordPress Entwicklern.

Robert Lender

This is a worthwile question I asked exactly a year ago that bears repeating:

Can you help me find additional blogs to follow? I am looking to broaden the scope of blogs in my reader. That broadening has two main dimensions: language and geography. Right now, because they’re often easier to find, and more regularly linked to, my feed reader is heavily anglosphere centric.

Some specifications for the type of blogs I am looking for:

  • Individual or group authored blogs, not company or organisational blogs. A blog maintained by a research group is an acceptable ‘in-between’ version. The reason is I see blogging as distributed conversations. Companies don’t have conversations. As a result I follow people, not blogs, in my feedreader
  • Some thematic overlap with my interests is needed, something to have those distributed conversations around. Such interests are: making, open data/source/access/everything, agency, civic tech, ethics, digital transformation for all, climate adaptation, knowledge work, complexity, philosophy of science/tech, change, learning

The areas I am looking to extend my blog reading towards are:

  • Indian bloggers, or India based blogs in English
  • Chinese bloggers, or China based blogs in English
  • EU based bloggers, in Spanish, French, Italian or German languages. Or Spain, France, Italy, or Germany based bloggers in English
  • Middle-, South-American bloggers in Spanish/Portuguese or English
  • Bloggers based in SE-Asia
  • Bloggers based in Nigeria, Kenya, Tanzania, Uganda, South-Africa

Any pointers, or pointers to list- or aggregator sites to explore are appreciated.

I had thought I had the language stuff all sorted, also because I had tested it. As it turns out, Google Translate works slightly different than my earlier conclusion.
It does look at the declared language in the <html> tag, but it doesn’t do so exclusively. Even if the language is declared it seems to still also look at the machine learning model.
This has as an effect that when a posting here in Dutch or German is very short, tweet-like, it will still detect that most of the page is in English (navigation structure, sidebar etc.), and treat the entire page as English. This makes even less sense than my earlier notion it follows the declared language, and machine learning if nothing’s declared, as it seems to actively distrust even the little bit of language mark-up it bothers to check in the first place.

It does mean that adding machine translation links at the end of Dutch and German posting is a good service to provide. Here I can’t trust the auto-detect feature of Google Translate (see above), so I must force the correct source language in the link I provide. This doubles the code needed (once for Dutch, once for German), but it works. The code is in the same function I previously adopted from Frank and Jan. I’ve added the translation links only to the RSS-feed, not to the website. My reasoning is that most of my regular readers do so through RSS, and that it’s them that might be interested in also reading my non-English postings.


A posting in Dutch as it appears on the site


The same posting in Dutch as it appears in the RSS feed, with added link to machine translation

For now I’m done with language adaptations. Although, having looked at some of the older conversations concerning multilingualism I’ve had over the years, I also considered how Stephanie Booth adds English excerpts at the start of a posting in French and vice versa. That might be something to emulate. However, it should not clutter up the postings or feeds too much, so likely should be another field. As I’m already using the excerpt field for other things (posting to Twitter and Mastodon mostly), that’s something to figure out in the future.