Skip to content


Web

Building a website in English and Malayalam: what needs care

Translating the text is the easy part. Unicode, typography, the language switch and how Google finds the Malayalam pages are where bilingual Kerala websites go wrong.

Written by Abhinav Krishna S, Web & Software Developer 7 min read

Building a website in English and Malayalam: what needs care

A Malayalam version of a website sounds like a translation job: give the text to someone who writes Malayalam well, paste it in, done. In practice the translation is the easy part. The problems are in what happens to the text after it is written: how it is stored, how it looks on a phone, how a visitor switches to it, and whether Google ever finds it.

This guide comes from building the Ihsan Charitable Trust website, where every page reads in English and Malayalam because the families the trust helps read Malayalam first and many of its donors read English. It is written for anyone in Kerala planning a bilingual site, and for the developers building one.

Make sure the Malayalam is real text

A lot of Malayalam in Kerala offices still lives in files typed with older "ASCII" fonts, the kind used in DTP for notices, brochures and newspapers. Those fonts draw Malayalam letters on top of English letter codes, so the text only looks like Malayalam while that exact font is installed. Paste it into a website and visitors see a line of Latin letters and symbols.

Text for the web has to be Unicode, the standard every phone and browser understands. A quick test: paste a paragraph into a plain text editor or a WhatsApp message. If it still reads as Malayalam, it is Unicode. If it turns into English letters and punctuation, it was typed in an ASCII font and has to be converted first.

Swathanthra Malayalam Computing maintains a free converter for this called Payyans. Each old font arranged its letters differently, so every font needs its own conversion map, and some vowel signs that the old fonts stored before a letter belong after it in Unicode. Have someone who reads Malayalam check the converted text before it goes live.

The same letter can be stored two ways

Malayalam has letters that end a syllable without a vowel, the chillu letters, like the one at the end of അവൻ. Before Unicode 5.1 in 2008, the five common ones were stored as a sequence: a consonant, a virama and an invisible joining character. Unicode 5.1 gave each its own single code. Both versions look identical on screen, and both are still in use, because older keyboards, documents and databases produce the first and newer ones the second.

The Unicode Standard itself says implementations "must be prepared to handle both kinds of data". On a website this matters wherever text is compared rather than only shown: a site search, a filter, a check for duplicate names. A visitor can search for a word that is plainly on the page and get no results, because their phone typed it the other way. If your site searches Malayalam text, convert both sides to one form before comparing them.

Malayalam needs more room

Malayalam letters carry vowel signs above, below and beside them, and conjuncts stack letters together. Line spacing chosen for English makes Malayalam paragraphs look crowded, and signs on one line crowd the line below.

On the Ihsan site the Malayalam version has its own settings, switched on by the page's language:

  • Body text line height goes from 1.7 to 1.8, and headings from 1.2 to 1.35.
  • Letter spacing and capital-letter styling are switched off. Malayalam has no capital letters, and spacing designed for English capitals spreads Malayalam words apart.
  • Menu items get less padding, because the Malayalam words for the same menu are longer and the header would otherwise break onto two lines.
  • Headings use Manjari and body text uses Noto Sans Malayalam, both free on Google Fonts. Gayathri, Chilanka, Anek Malayalam and Baloo Chettan 2 are worth trying too.

Check every page in both languages on an ordinary Android phone, not only on a designer's laptop. A button label that fits in English often doesn't in Malayalam.

Don't make English readers download Malayalam fonts

Malayalam fonts are large, because the script needs far more letter shapes and conjuncts than English. The Ihsan site only loads them when the page is in Malayalam, or on a first visit while the visitor is still choosing a language. An English reader never downloads them.

Our own ordering app, OrderRaja, does the opposite and ships fonts for Malayalam, Tamil and Hindi with the app, so those scripts look the same on every phone. Both choices are reasonable. What matters is deciding, rather than finding out from a slow first page.

Tell the browser which language it is reading

Each page should declare its language on the html element, and mark any phrase in another language on the element around it. That is the W3C's guidance, and the accessibility standard WCAG requires it so that screen readers switch to the right pronunciation. On the Ihsan site each page is marked "ml" or "en", and the link that switches to Malayalam is marked as Malayalam too, since its text, മലയാളം, is.

This is for browsers and assistive technology, not for search. Google says plainly that it works out a page's language from the visible content and doesn't use the lang attribute. Which brings us to the part bilingual sites most often get wrong.

Let Google find both versions

Google's guidance for multilingual sites comes down to three rules:

  • Give each language version its own URL. Google recommends separate URLs per language, and lists URL parameters and cookies as not recommended ways to switch, because its crawler may never see the other versions.
  • Link the versions to each other, so every page says where its translation is (the hreflang links).
  • Don't redirect visitors automatically by browser language or location. Let them choose, and make the choice easy to find.

The Ihsan site follows the second and third. Every page links to both versions, a first-time visitor is asked which language they want, and the switch is in the header of every page. The language itself is chosen with a "?lang=ml" parameter and remembered in a cookie. That is simple to run and each version still has its own address, but it isn't Google's preferred setup. If ranking in Malayalam search matters to you, give each language its own path, such as /ml/about. That is what we would build for a business that wants to be found in both languages.

Translate the whole page, and keep both up to date

Google also warns against pages where only the menus and buttons are translated while the main content stays in one language. A half-translated site serves Malayalam readers worse than an honest English-only one.

The harder problem comes after launch. If the Malayalam text sits in a file only the developer can edit, it falls behind within months. On the Ihsan site every line of copy, every service and every album name is stored in both languages, and the trust's staff edit both in the admin. Whatever system you use, it shouldn't be possible to publish a page in one language and forget the other.

A checklist for a bilingual Kerala website

  • Is all the Malayalam text Unicode, not an old DTP font?
  • Does site search treat both forms of the chillu letters as the same?
  • Have line height, letter spacing and menu widths been adjusted for Malayalam?
  • Are Malayalam fonts loaded only where they are needed?
  • Is each page marked with its language?
  • Does each language version have its own address, linked to its translation?
  • Can visitors switch language from any page, without being redirected automatically?
  • Can your staff update both languages without a developer?

If you are planning a site for people who read Malayalam first, our UI/UX design team can plan it in both languages from the first sketch, which is far easier than adding a second language later.

In practice

Our ui/ux design work.

OrderRaja: Ordering & queue app for food businesses
Project of Eyednext Software

Travel & Hospitality · Kochi, India

OrderRaja

Our own ordering app for food stalls, carts and cafés.

Ordering & queue app for food businesses
Get My Serv: Service marketplace platform
Website Software

Business & Professional · Dubai, UAE

Get My Serv

A two-sided marketplace for corporate services in Dubai.

Service marketplace platform

Keep Reading

More from the studio.

How resort management software stops double bookings

Software 6 min

How resort management software stops double bookings

Two guests, one villa, the same night. Why double bookings happen when rooms are sold in several places, and what resort software has to do to stop them.

EN Eyednext TeamKochi studio

Read