Tech

Reviving a WordPress theme

I originally created the WordPress theme for this site back in 2010 when WordPress was on version 3.0 (and Kesha’s “Tik Tok” was Billboard’s top single of the year). Then I pretty much ignored it for 16 years. Thankfully, DreamHost was keeping my WordPress installation up to date so this site didn’t become a pawn in the dark web. And, much to my surprise, my theme still worked fine 4 major versions later. It wasn’t great… but it worked.

As part of reviving this site, I figured I should give the theme a refresh. Over those 16 years, WordPress had introduced block themes while still supporting classic themes . Meanwhile, the community had merged the two concepts into a Frankenstein-like… Continue reading →Reviving a WordPress theme

Compiling PyFriBidi on Windows

Although I mentioned in my previous post that PyFriBidi isn’t the Swiss Army knife of Python language support, it’s still rather useful as far as RTL language support goes given the alternatives (i.e., none).  Using it, though, requires that little step called “compiling”, which turns out to be far from a bundle of joy on Windows.

I ended up compiling it using Visual Studio 2003 to keep with the cardinal rule of using the same compiler as Python itself (2.5 in my case). Given the number of bug reports for MinGW/Cygwin, I don’t think either of those would have made this any easier. Instead of having you follow 500 steps, I’m just going to refer you to a build script… Continue reading →Compiling PyFriBidi on Windows

Working with Arabic in Python

Part of working for a language services company means you get very familiar with the Unicode standard. Intimately so, to the point of awkward night-after calls. Case in point: Arabic shaping. The basic gist is that, because Arabic script is cursive, the appearance of any specific character depends on how it joins to its neighbors. For the eye-dilating details, refer to Section 8.2 of the Unicode Standard 5.1.0.

One aspect of our system uses ReportLab to create PDFs in any of the languages we support. Given Middle Eastern languages are all the rave right now (I’ll let you figure out why that might be), it didn’t take long for us to hit right-to-left (RTL) languages and, in particular, Arabic. Python’s… Continue reading →Working with Arabic in Python