Sunday, January 16, 2005

Naming files in a multilingual site

If you plan on translating your website to several languages, one of your first issues will be devising a naming scheme for the translated files and folders. I have some advice for you.

Don't change the file names! Don't change the folder names!
Instead, put the translated set of files in a new parent folder named for the target language, e.g., /ger for German. All the original files and folders (now translated to German, of course) should branch out from here. That way, all of your relative links from file to file should work without modification.


The above illustration shows a well-structured trilingual website in English, German and Spanish. The site was originally designed in English to contain three folders: /images, /press and /products. At the time, no one thought the site would be translated, so a folder for English was never contemplated, but that's OK.

Later, German and Spanish were added under the folders /ger and /spa. Below these language folders, the structure of the original site is replicated. The names of the HTML and image files remain exactly the same so that the relative links don't need to be touched. That's it.

PDF files
I wrote this very basic posting to mention an exception that proves the rule: PDF file names. PDF files should incorporate their language in the file name itself, e.g., brochure_eng.pdf and brochure_spa.pdf. Why? Because PDF files have a life beyond the website where they are stored, as attachments to emails and as loose files on someone's hard disk. The file name should show the language that the file is written in. Furthermore, if the brochure is written in three languages under the same name and you want to attach all three versions to the same email message, you'll have a nasty little naming conflict.

0 Comments:

Post a Comment

<< Home