Support for 'other' languages

Started by Arantor, June 03, 2009, 05:37:25 AM

Previous topic - Next topic

Arantor

In the same way Google allows translation to a few 'unconventional' languages, as on Google UK's Language Tools page, is there a plan to provide a language pack for such esoteric languages as Elmer Fudd, the Swedish Chef or Hacker?

No worries if not, just a random question I thought I'd ask.

(I can help develop these if necessary; I once wrote a site in PHP that would do such transformations on text - not a spam link, but a relevant one; the site provides Fudd, Chef and other such translations)

Of course if this would be better served as a mod I can perhaps go away and build one. (If so please move to Mods)

Daniel15

Haha, that's a great idea! :D
I'd probably write a script that goes through all the .english.php files, and makes edited copies of them. You could probably use a regular expression on all the files, something like

preg_replace_callback
('~\$txt\[([A-Za-z0-9\']+)\] = \'(.+)\';~''do_transform'$file);

...

function 
do_transform($matches)
{
	
// Do some magic to $matches[2]
	
// ...
	
// and then return it!
	
return 
'$txt[\'' $matches[1] . '\'] = \'' $matches[2] . '\'';
}

(note: Not tested, my code usually breaks the first time :P)

Doing it as a mod, or doing the transformations 'on-the-fly' would be a lot slower compared to just translating the files once. ;)
Daniel15, former Customisation team member, resigned due to lack of time. I still love everyone here :D.
Go to smfshop.com for SMFshop support, do NOT email or PM me!

Akyhne

You are even welcome to make a Sylvester Stallone language pack if you want, but we only add official languages and dialects to the download section ;)

Advertisement: