Share via


Klingon in pIqaD Windows Vista Custom Locale

[Updated 11 Aug 2006, changed tlh-pIqaD-US names to reflect IETF standard]

Cool, they let us post files now I'll have to try that out.  The example only works for Windows Vista, although the culture would work for Microsoft .Net 2.0.

Creating a custom locale for a script that isn't in one of the existing system fonts is a bit more challenging.  I picked Klingon for this, even though its a "made up" language because it demonstrates all of the parts.  Presumably "real" locales will have a similar need to make a keyboard or maybe even use a 3rd party font to support their language and script.  Here's what it looks like in Outlook (Outlook creates the date from user locale data when you press reply).

WARNING: What I'm doing isn't supported, but it mostly works for me, so maybe it'll be informative to you.  This example involves mucking with the registry and if the wrong thing happens you could pretty much make a mess of your system.  Back up the registry before doing this and don't do this if you don't understand the registry.

The problem with Klingon in its native script as an example is that pIqaD isn't supported in Unicode, nor is it supported by Windows, nor is there any way to type it in.  So to make it work in a reasonable fashion we need A) a Custom Locale, B) a font, C) a way to trick the system into using our font, and D) a keyboard to type in that culture.

The attached tlh-pIqaD-US.zip has these pieces in it.

  • example.png shows an example of Outlook using the custom locale on Windows Vista after doing these steps.
  • tlh-pIqaD-US.msi installs a Klingon custom locale on Vista that uses the pIqaD font.  This .msi was created using the Microsoft Custom Locale Builder tool beta, which I'll blog about later when I have more links.
  • tlh-pIqad-US.ldml is the LDML for that culture.  You don't need this if you use the .msi, but I included it for completeness.
  • pIqaD.ttf is a font I created for Klingon.  This is my first time making a font and I'm not an expert.  Its been a bit strange for me sometimes, but mostly it works.
  • pIqaD font linking.reg has some registry entries to make Windows Vista include this in its font linking list for some common fonts used by the system.  Theoretically this slows down the system to do this, but I haven't noticed any problem.  This is another area I don't understand well, but it works (for me anyway).
  • US-Kling.msi is an installer for a Klingon keyboard.  It attaches to EN and uses Alt-GR for the Klingon (press ctrl+alt+a letter key).  I picked letters for the sounds in Klingon.  It uses the US-kling.dll in the i386 folder to install.
  • en-klingon.klc is a Microsoft Keyboard Layout Creator file used with MSKLC to create the preceding .msi.  In case you don't like my keyboard you can make your own.

Making it all work.  To use my example, unzip all the attached files somewhere convenient and follow these steps:

A) To make a Klingon custom locale with the pIqaD script on Windows Vista, the first thing we need is to create and install the locale.  You can either run tlh-pIqaD-US.msi on Windows Vista, or use the LDML with the CultureAndRegionInfoBuilder or make your own.  I covered a bit more about custom locales in my previous blogs.

B) Making a font is really hard.  Hopefully you can get whatever font you need from someone else for a few bucks, but I needed a font I could post here, so I had to make my own.  Just copy the pIqaD.ttf to your %windir%\fonts folder.  Note that my font isn't "quite right" and I don't know why.  Some builds of Vista have given me fits with it, let me know if there are problems.

C) "Font Linking" is what we call the Windows behavior where the OS looks for a different font if it can't find your character in the specified font.  MSDN describes this more here.

If you look at [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink] in the registry, you'll see entries for each font.  Stick your font name (ie: pIqaD.ttf) at the beginning of each font you want to fallback to your characters.  The attached "pIqaD Font Linking.reg" does that for 4 common fonts in Windows Vista.  Note that this means that any other font using those code points won't get used, so do this with care.  Normally the list falls back in cases like falling back to Chinese fonts from Latin fonts.  You have to reboot to get the new linked fonts to behave.

D) A font doesn't do much good if you can't type it into the machine.  I used the Microsoft Keyboard Layout Creator to create the US-Kling.msi.  Michael Blogs about the MSKLC if you want more info.  Run US-Kling.msi to install the keyboard.

  1. Install the US-Kling.msi (the i386 folder and the US-Kling.dll in it must be in the same place as the .msi)
  2. From Regional Options (run intl.cpl), pick Keyboards and Languages, then pick Settings, then pick Add and pick English US Klingon (AltGr) from the list.  There might be a better way to attach it in Vista, but I haven't tried since XP and they have to be stuck to existing system languages.
  3. Go ahead and select Klingon (US, pIqaD) as your default user locale if you want while you're in regional options.
  4. You may need to right click on the task bar to pick the Language Bar toolbar.
  5. Click on the Keyboard icon on the Language Bar to change to the new keyboard.

I hope this has been useful (or at least entertaining).  Even though I picked Klingon, hopefully other users will find more mainstream uses for these pieces.

- Shawn

  

tlh-pIqaD-US.zip

Comments

  • Anonymous
    February 20, 2006
    We're working on a tool, the Microsoft Locale Builder, for Windows Vista to help users create their own...

  • Anonymous
    August 10, 2006
    I ran into an example today of "tlh-KX" being used for Klingon and felt it was worth a blog.  This...

  • Anonymous
    July 31, 2007
    We're working on a tool, the Microsoft Locale Builder, for Windows Vista to help users create their own

  • Anonymous
    October 10, 2007
    PingBack from http://www.pixalo.com/community/computer-hardware-software-networking-internet/help-please-desktop-wrong-way-18519.html#post159150

  • Anonymous
    November 25, 2008
    PingBack from http://iuliana.wordpress.com/2008/11/26/sprechen-you-limba-klingoniana/

  • Anonymous
    February 11, 2010
    DONT'T USE THIS,t will corrupt unicode symbols,chinese,korean and japanese charecters!

  • Anonymous
    March 30, 2010
    Hmm, I'm curious how you had a problem, I've been playing with it for years.  Perhaps it's something with the linking?  (Stick it at the end?)

  • Anonymous
    November 09, 2011
    It seems you've long moved on from this but I'm having a problem trying to get set it as my System Locale, is it possible with this on Windows Home Premium 32-bit?  or is System Locale and "default user locale" two separate things?

  • Anonymous
    November 09, 2011
    Basically, you probably want "Klingon" (or whatever you're using) as your user locale for other users/processes.  (Advanced tab of intl.cpl, copy settings).  Unless you are thinking of the UI language.  System local should be "only" the ACP code page and uninteresting for Unicode Applications. I just posted about the difference between User Locale, UI Language, System Locale, and Location. blogs.msdn.com/.../user-locale-system-locale-ui-language-language-profile-amp-all-that.aspx

  • Anonymous
    November 27, 2011
    Sorry another question,   I'm trying to do Font-linking on Vista Home Premium 32bit and when I go the folder you specify in this article, instead of seeing the names of the fonts (in the second column where the fall-backs are listed) It just shows me the numbers in hex or something.   Is there a setting I have to locate to make it show me the names of Fonts instead of the data numbers.  (I think it's called the Binary data.. but not sure)

  • Anonymous
    November 28, 2011
    Sorry, I haven't used Vista in a while :), so I'm not sure how Viasta's regedit shows it.  When I export a .reg file though, the REG_MULTI_SZ values do show up as hexadecimal versions of their Unicode code points, so I expect that's what you're seeing.  I edited the values by hand in regedit, and then exported a .reg when I needed to copy that to another machine, so I didn't actually have to edit the hex values.

  • Anonymous
    May 20, 2013
    dear sir how do you write the letter f or the letter k in klingon

  • Anonymous
    May 21, 2013
    Not all languages, even invented ones, have the same sounds, so they don't have the same alphabets.  For example, we don't usually use a glottal stop in English, in words like uh-oh, where it gets represented by a hyphen, but a hyphen isn't part of our alphabet.  Hebrew only has 22 letters.  Hawaiian only has 13 letters.   So it isn't surprising that Klingon would be missing some of the sounds and equivalent letters of the English alphabet.  It's likely that "native" Klingons would have difficulty speaking some of these sounds, similar to the way that foreigners sometimes have a hard time pronouncing or distinguishing some English sounds. en.wikipedia.org/.../Klingon_language describes the phonology of Klingon, and www.kli.org/.../pIqaD.html describes the orthography somewhat, and, of course, more detailed information is available in The Klingon Dictionary.