Add Me!Close Menu Navigation

Hi, I'm Alfredo Matos, a research engineer, programmer and entrepreneur from Portugal. This is my old (and closed) blog. It exists only as an archive. For more information head over to alfredomatos.com or follow me on twitter.

Add Me!Open Categories Menu

What does l10n, i18n or m4 mean ?

I have never understood what l10n stands for, nor i18n, nor m4 for that matter. But reading a good online book about autotools, there are a couple of words explaining that in fact m4 stands for Macro, which is m+4 chars. l10n is localization written asĀ  “l+strlen(ocalizatio)+n”. Fun. Since I was on vacations while I read this, I had time to write a bash script to do this automatically while enhancing my bash skills. Here is the script:

#!/bin/bash

STRING=$1
STRLEN=${#STRING}

A=${STRING:1:$STRLEN-2}
echo ${STRING:0:1}${#A}${STRING:$STRLEN-1:$STRLEN-1}

Try running internationalization on it.

Posted By alfmatos

Comments are closed.

About Me

Hi, I'm Alfredo Matos. I'm a research engineer from Portugal, with a passion for inventing new things and working on future technologies. I'm also a programmer and entrepreneur. For more information check out my main website alfredomatos.com.