New user registration is currently disabled due to spam abuse / Регистрация новых пользователей в настоящее время приостановлена из-за злоупотреблений спаммерами

Creating multi-lingual entries (font workaround)

All about dictionaries

Creating multi-lingual entries (font workaround)

Postby Maxeem » Wed Jan 28, 2015 11:23 pm

Hi folks,

I know this has probably been addressed elsewhere, but I just wanted to express my gratitude for the program and the simple way it functions as promised. It's a lovely program. I am only surprised that it took so long to appear because of how functional, how basic and how crucial a human tool it seems to be.

Scenario: recording ultra-rare or fictional languages and wanting to create entries using multiple fonts so that we could see the glyphs (as a custom font, using Font Forge) and also see the English alliteration beneath, or multiple languages (as long as you are okay with them staggering a bit). This is what I came up with, but let me know if I could be doing this a better way.

I saved an entry and looked at the data and noticed the tag format in the HTML is roughly something like:

<div class="gddictname">
<span class="gdfromprefix">From </span>[language name]
</div>

<span class="gdarticlebody gdlangfrom-en" lang="[ISO 639-1 two-character language code]">
<span class="dsl_article"><div class="dsl_headwords"><p>[word]</p></div>

<div class="dsl_definition"><p> [...] </p>

<div class="dsl_m1">[entry]</div>
<div class="dsl_m2">[entry]</div>
<div class="dsl_m3">[entry]</div>
[etc.]

<p></p><p></p></div></span></span></span>


So in the article-style.css I just made an entry for a personally unused language with characters that match the alphanumeric of the target language. For example, if it's roughly Roman (rather than Cyrillic, Korean, etc.) I could pick Dutch and make a dictionary for personal use claiming to be Dutch. Then the custom dictionary's headers would be:

#NAME "Migook (or other name)"
#INDEX_LANGUAGE "Californian"
#CONTENTS_LANGUAGE "Dutch"


The style-sheet could then have an entry like:

Code: Select all
:lang(nl).dsl_m2
{
  font-family: "Migook Glyph";
  font-size: 24px;
}


... which makes only the m2 entries of each Dutch entry dictionary appear in the custom Migook Glyph.

The dictionary file (DSL) could now contain some words like this:

Code: Select all
#NAME "Migook (or other name)"
#INDEX_LANGUAGE "Californian"
#CONTENTS_LANGUAGE "Dutch"

success
      [m2]TUBULAR[/m2]
      [m3]Too-Byoo-Luhr[/m3]
   
failure
      [m2]BOGUS[/m2]
      [m3]Boh-Guss)[/m3]


The result would display the Migook Glyph in a custom font above a slightly indented (difference between m2 and m3) English alliteration.

---

As you can see, this works, but the key entry here is that two-letter ISO 639-1 code, which doesn't seem to allow one to invent new ones. If I wanted my own custom language, I should be able to set it to #CONTENTS_LANGUAGE "Migook" and give that the letter designation cx ... but somewhere. Where?

Or is there a special tag that can be used, such as #CONTENTS_2-LETTER-CODE "cx" ?

Anyhow, I am absolutely thrilled it works at all, but to be a stickler for future functionality, I wonder if I'm missing an obvious way of doing this without overriding beautiful, pre-existing languages limited to the 200-some in the official list, e.g.; http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes.
Maxeem
 
Posts: 3
Joined: Wed Jan 28, 2015 10:40 pm

Re: Creating multi-lingual entries (font workaround)

Postby Maxeem » Sun Sep 04, 2016 3:57 pm

Just want to bump this in case anyone has come up with an answer.

Is there a way to change within the GoldenDict program what full name language (e.g.; "German", "Russian") is associated to which 2-character code?

Barring that, is there at least any way to make a custom 2-character language code with its own full name? For example to have QQ mean "Ququ" or WW mean "Martian" ?
Maxeem
 
Posts: 3
Joined: Wed Jan 28, 2015 10:40 pm


Return to Dictionaries

Who is online

Users browsing this forum: No registered users and 5 guests

cron