Category Archives: blog

Weblog language translator – blog translation on the fly with Roller specific functionality

Finally got round to upgrading my ‘Weblog language translator‘ from beta.

Key to improving it was removing the roll over based banner I had implemented (the Google translation service, which I piggy-back off of, only translates circa 3k characters, so the banner header, full of links was using up the majority of the translation).

Obviously this points out a few of the flaws of the implementation, namely reliance on Google to provide the service (and of course a dependency on the call syntax not changing), and all of the weaknesses that follow on from relying on the Google service, not least the translatable character limit.

This time round I’m much happier with the implementation – and I’ve done a fair bit of testing to ensure it’s fit for purpose.

Unlike the other implementations out on the web I’ve added Roller specific functionality, implemented in JavaScript, creating a ‘main’ (or rather ‘weblog’) page for each language.

I did this because I wanted to tailor the service to be language specific, and because the major search engines outside of the English speaking, Google dominated, Internet, often verify that there is actual language specific content (and I want these search engines to be able to index my site, even if that’s only a couple of pages).

The code uses Roller Weblogger specific URL notations to provide the matching ‘weblog_xx’ (where xx stands for the two character country code – five characters when looking at Traditional and Simplified Chinese) to the target language to be translated to.

Currently it works for the generic weblog URL, all ‘entry’ variants, all ‘date’ variants, and all ‘page’ variants. It doesn’t work for ‘tags’ or ‘category’ variants (mainly because I haven’t had time to research the URL notation), but I hope to get this done soon. I’ll research and code up the other, alternative Roller URL formations when I next revisit the code. I find this acceptable, as it still provides a translation, however without accessing the language specific ‘weblog’ page.

The JavaScript is available via the page source – and you’re welcome to have a look and re-use if you wish (it’s nowhere near the nicest bit of JavaScript available – if you’d like to tidy it up at all you’re more than welcome).

I’ve also added Dutch and Greek to the list of languages that can be translated to, as these have been recently added to Google’s translation service (still no Hindi or Bengali though). That makes a total of fourteen languages, including the already implemented Simplified Chinese, Traditional Chinese (Taiwanese), English, Spanish, Arabic, Portuguese, Russian, Japanese, German, Korean, French and Italian. Plus I’ve replaced the language text with flag icons – which improves the look and feel too.

The icons are “available for free use for any purpose with no requirement for attribution” (although I thought it would be nice to credit the originating site) from FamFamFam, by fellow ‘Brummie‘ Mark James, available at https://www.famfamfam.com/lab/icons/flags/

Previously, after the initial implementation in beta, I found a variety of resources in a similar vein, none of which are Roller specific though, here’s a few examples for you to have a look at if you’re interested:

Have to admit I’m really glad I’ve tidied this up as I was starting to feel as though it was in danger of genuinely being in ‘permanent beta’, and however fashionable that is, in the apocryphal words of Steve Jobbs: “real artists ship”.

Using Alternate Style Sheets to switch design

Due to the large number of images and diagrams that will be accompany the articles on “UK Government G2G Messaging Sub-Systems” to follow over the next week, I’ve implemented an “Image Resize” function, to allow you to alter the image size of all diagrams in the main body of this site.

You should be able to see a section heading on the right hand side bar called “Body Image Size”, the choices are “Small” (thumbnail) , “Medium” (default) and “Large” (body width).

It’s implemented using alternate CSS Style Sheets, and was inspired by Tim Bray’s site ‘Ongoing’, where Tim uses it as a technique to switch between the ‘Serif’ and ‘Sans-Serif’ font types.

I got assistance from this article “Alternative Style: Working With Alternate Style Sheets” by Paul Sowden, hosted over at ‘A List Apart’.

Thanks to Justin Hibbard, Lead Engagement Architect and Systems Engineer (SE) for the Department of Work and Pensions (DWP) at Sun in the UK, who’s comment on the issue of “illegible text” on my diagrams instigated me to add this functionality. Justin also points out that images are rendered poorly on both IE and Firefox, however Safari (both on Windows and Mac) does a better job, personally I find Opera has the best image rendering support.

In the future I’m hoping to use this technique to allow the readers to instantly change the look and feel of the site. I like the site look and feel as it is but change is good – and choice is even better.

Few last items before I sign off tonight:

  1. Congratulations to Gordon Brown on his ascension to Prime Minister tonight, and to Harriet Harman as the new deputy leader of the Labour Party.
  2. Congratulations to Harry Saxon on his ascension to Prime Minister last night (Whovian specific content).
  3. Pleased and proud to say that Andy and Joey were both awarded Orange belts (junior 4th Kyu), and that Donna and I were also both awarded Orange belts (adult 4th Kyu), at our Karate classes today.

Stabilising Look and Feel

Since my first post I’ve been working on getting the look and feel that I want, and although I haven’t quite finished here’s an update.

I started with the Sun Pacifico Theme, which at the time I liked a lot. However the more I looked at my blog, the more I wanted something that was, if not unique, at least “mine” – and not just in terms of the content.

Look and feel / web design was the most obvious area to change, but, to an extent I had held back a little, because I knew that it would likely mean delving into a host of technologies – only some of which I was up to date & familiar with.

Wanting something that was very minimal, similar to the Blogger Template Style “Minima” by Douglas Bowman (here) of Stopdesign (here), and as used by my friend Alan Mather on his blog (here).

I feel that the content needs to stand for itself without too many distractions calling the eye’s attention. I find that very busy websites, with lots of “eye candy“, lose detail amongst the noise. I know lots of people are enjoying using technologies like Snap (here), but I wish they would include some mechanism for the user to turn it off – as it can easily get confusing for with so many link page pop-ups appearing.

As to the banner, I had previously been impressed with Damien Hirst’s Pharmaceuticals (2005), an example of which is here, an installation he had done as part of his show at the Tate Modern, New York.

But instead of tablets and pills, I thought it would be effective to use small web site logos & icons instead (mainly the favicon). After getting a version working on that premise I very quickly realised that there would be a variety of copyright issues involved, as well as issues in loading a banner comprised of 300 (5 rows by 60 columns) of 16×16 pixelated images. Just too many calls to the web server, meaning page load time was very slow.

So this is pretty much the finalised look and feel for the time being. I’m much more pleased with the banner now – and having utilised CSS Sprites, reduced the calls to two images – both of which I cache using JavaScript at the start of the page too.

Now that I’m happy with the overall look and feel – I’m going to focus on Site Navigation, followed by a code cleanup, and then, maybe, back to the Design aesthetic.

There might even be time for the odd post or two.

Weblog language translator – beta

I’ve just implemented a weblog language translator, based on Google Translator.

It’s very rough and ready, deserving of the title “beta”, and very simple, but it appears to do quite a nice job of translating into the majority of the World’s most used languages.

I had just been reading The Aquarium (over here), and I was very impressed with it’s multi-lingual support.  I don’t know how the guys are doing this, but I’m presuming that they are actually translating the text manually (i.e. with human editors), after searching on the topic of blog translation.

The languages that I’ve included are: Mandarin (Simplified Chinese), Chinese (Traditional Chinese), English, Spanish, Arabic, Portuguese, Russian, Japanese, German, Korean, French and Italian. 

I wanted to do the fifteen or so most used languages – however the sources I found disagreed slightly on actual numbers and rankings.  The sources I used to understand the breakdown of percentage of languages spoken by the World population were:

1) Dr. Dennis O’Neil’s website (here) at the Behavioral Sciences Department, Palomar College, San Marcos, California.

2) The “Languages of the World” article (here) at The National Virtual Translation Center.

3) The “List of languages by number of native speakers” article (here) at Wikipedia. 

Unfortunately it suffers from two major issues. Firstly it’s limited to the languages supported by the Google Translator service, which unfortunatly does not cover a number of the World’s most used languages (notably Hindi and Bengali).  Secondly the Google Translation service modifies the page links so that the “Language” links I’ve implemented are translated twice, which fails in the service at runtime. 

Other issues include: maximum text amount that can be translated is limited (or appears to be, so that part of the page doesn’t get translated), the banner I’ve implemented goes awry in some of the translations, the sidebar isn’t getting translated (might be due to the text length limit issue, as the sidebar is written after the content), and, as I don’t speak the majority of these languages, I’m presuming the translation that it does is no means as good as an actual, professional, human translator. 

I’m going to tweak the code and look at how (and if) I can use the service to perhaps translate individual components, plus I’m going to see if the Google API can provide a more succint and elegant dynamic solution.  I had tried to implement in both Google Translator and Yahoo Babelfish, but the Babelfish service was erroring out, thus the use of Google – I might try it again later though.

I have a other requirements for this functionality too: ideally it should produce pages which can be indexed by the major search engines and it should translate feeds – both RSS and Atom. 

Have a look and see what you think – any opinion would be good, especially from those who aren’t native English speakers.

About me…

Hi, my name is Wayne Horkan and I’m the Chief Technologist for the UK and Ireland at Sun Microsystems.

I’ve been at Sun for almost eight years and in my current role for just over two years.

The role I have covers three main areas: Customer and Partner engagements (helping develop systems), Awareness and Adoption (helping to make people more aware of Sun and Sun technologies), and Architectural and Solution Quality (help to ensure we reduce risk by using Standardization).

Before being assigned my current role I spent most of my time at Sun in Sun’s delivery organization, directly delivering systems and helping people in the adoption of technology. Whilst I’ve been at Sun I’ve always been part of what Sun call Customer Engineering (CE, although it also gets called Field Engineering or FE), this is the field organization which works directly with customers, in comparison to Product Engineering (PE) who innovatively develop our new technologies.

Being at Sun has given me wonderful opportunities to work at a senior level on some of the largest, most diverse and interesting, systems in the world, with some of the best technologists, business people and consultants, including:

  • SOA Design and ‘transformation roadmap’ for one of the largest UK Government organisations.
  • Identity system for an early SOA at one of the worlds largest investment banks (over 42,000 users across over 30 major systems).
  • Consolidation of 5000+ servers at another large investment bank (based out of Canary Wharf).
  • A Total Cost of Ownership (TCO) engagement with a very large ISP.
  • Technical Design Authority (TDA) and Technology Leader brought in as a White Kinght at a Data Centre build out which up until then had gotten eight months behind schedule.
  • The Governance design for Sun’s largest customer engagement.

Before working at Sun I spent almost three years as the Chief Architect for Harrods, building amongst other things Harrods Online (v1 and v2, v1 was MS Commerce Server based if you remember that, whilst v2 was Sun and Vignette based).

Prior to Harrods I worked at Keane Inc., a Systems Integrator (SI), as a Technical Consultant. I spent time at Sun Life Assurance (now AXA) building a workflow and document imaging (scanning) solution, and at East Midlands Electricity (EME, followed by PowerGen, currently E.On) developing messaging subsystems and front end applications as part of the deregulation of the Gas and Electricity industries (the 19M programme as it was called).

I also spent a couple of years at Touch Systems, writing software to improve manufacturing process quality and cost, utilizing hand held data collectors, a shop floor network application environment and Statistical Process Control (SPC).

Outside of Sun I also work with a CDFI charity called Street UK, and I give (limited) advice to a CDFI collective called the Fair Finance Consortium.

I’m a supporter of professional membership organisations, and am a member of the British Computer Society (BCS), the Institue of Electrical and Electronic Engineers (IEEE), the Insitute of Directors (IoD), the Lunar Society and the Information Technologists Company (ITC).

Contact details

You can get in touch with me here: wayne.horkan-AT-sun-DOT-com

About this site

This site is my personal weblog, hosted and provided by Sun Microsystems, my employer.

This blog is governed by the Sun’s blogging policy, or the Sun Guidelines on Public Discourse as it’s called.

Many thanks to Linda Skrocki who recently wrote about Sun’s Revised Blogging Policy (AKA Guidelines on Public Discourse).

Disclaimer

This is a personal weblog, I do not speak for my employer, Sun Microsystems (or Sun Microsystems UK).

Copyright

This work is licensed under a Creative Commons License.

Copyright 2007-2008, Wayne T. Horkan (wayne dot horkan at sun dot com).

FAQ

“I’d like you to come and present to my organisation on…”

  • Sun’s product portfolio, strategy, etc.
  • Futurology.
  • Enterprise Architecture.

Get in touch (see above) and lets talk.