If you're using an OS or OTS CMS, there's likely to be built in language support. If you're building something yourself and you have the time to do your own language translations, you could use Google Translate or Microsoft Translate to build your translation file.
Null has a good comment, this just expands more:
Joomla & PHPBB have good examples of language implementations.
JText::_('COM_SOMETHING_BLAH_TITLE');
to code your own:
- Create language files
language.en
language.es
- In each language file add the same lines:
(en) MESSAGE_SOMETHING="Something"
(es) MESSAGE_SOMETHING="Algo"
Create a class or function to print out language text:
print translate('MESSAGE_SOMETHING', 'es');
and your translate function could be something like
function translate ($label, $lang) {
$language = load_and_populate_language($lang);
$translated = $language[$label];
return (if $translated is empty, '', else $translated)
}