Using flags is a bad idea when dealing with multi-language content. Flags represent countries, not languages. Which flag would you use for Engish? The Union Jack? The Stars and Stripes? Neither will work for me, as I'm Canadian. How about French? Again, I speak French but I'm not from France.
Using words rather than flags is a better option unless the different versions are really country-specific. English, franšais, dansk, suomi, Deutsch and not the English names too. :)
I agree with mack that the best way is to either language-specific subdirectories, or subdomains if each language variant is truly a separate site:
Use the standard two-letter ID for each language.