In my case, I don’t think that will be a problem. This is designed to allow the same codebase to be used across a number of wikis, with just a few language-specific tweaks. All the important content will be in just one language. There is no dynamic switching of language.
This is related to things I’ve discussed in three previous posts regarding Bible wikis.
Currently I handle the small bit of internationalization needed with lines like this:
{
"title": "${title}",
"tags": "${TableOfContents}",
"text": "<div class=\"tc-table-of-contents\" style=\"column-width:12em;\">\n\n<<toc-selective-expandable \"${Book}\" \"nsort[seq]\" >>\n\n</div>\n",
},
(note the use of ${title}, ${TableOfContents}, and ${Book})
which uses lines like these from a translation file:
"Chapter": "Capítulo",
"Book": "Libro",
"Books": "Libros",
"Verse": "Versículo",
"Contents": "Contenido",
"TableOfContents": "Contenido",
and this bit of code:
const update = ({title, language: {Book, Books, Chapter, Verse, Contents, TableOfContents, books: {Psalms}}}) => (tiddler) =>
Object.fromEntries(Object.entries(tiddler).map(([k, v]) => [
k,
v.replaceAll('${title}', title)
.replaceAll('${Book}', Book)
.replaceAll('${Books}', Books)
.replaceAll('${Chapter}', Chapter)
// ...
to create a tiddler like
title: "La Biblia Reina Valera Gómez"
tags:"Contenido"
<div class="tc-table-of-contents" style="column-width:12em;">
<<toc-selective-expandable "Libro" "nsort[seq]" >>
</div>
That works fine for creating the various Bible versions. But the idea of extensions for these wikis, created not just by me but by others means that I have to revisit this to handle that. Here’s where I thought of using <<lingo>>. I can add language tiddlers for each of those terms above, and the extension can use them with <<lingo>>. If the extension has other internationalization needs, it can define its own language file that extension translations can also implement.
Of course I can define my own macro in place of <<lingo>>, but using the $:/language namespace seems to make sense. I’m just hoping that it’s reasonable to use the namespace the way I suggested.