SupportArea

BoltWire is a FREE content management system written in PHP.

Its innovative architecture combined with best-in-class forms processing makes it ideal for creating complex, interactive, web applications fast...


PLUGINS

SKINS

LANGUAGES

Language Creator

Extensions > Plugins > Language Creator

Here's a quick, down and dirty way to generate raw language packs for 80 or so languages using google translate.

First, copy this code to plugin.php, or better yet, create a custom plugin and just enable it for action.language:


function BOLTXlanguagecreator($value, $field, $args) {
     $template = BOLTloadpage('site.language.template');
     $lines1 = explode("\n", $template);
     $lines2 = explode("\n", $value);
     foreach($lines1 as $i => $ii) {
          $out[] = strtolower(trim($ii, ' :') . ' :: ' . trim($lines2[$i], ' :'));
          }
     $new = implode("\n", $out);
     $data = "\n~~data~~\ntitle: $_POST[title]\n~\n";
     BOLTsavepage("site.language.$_POST[code]", $new, $data);
     }

Now, create page action.language with the following content:


! Language Pack Creator
Use this page to create a language pack using GoogleTranslate. Here's how:

Open up [[https://translate.google.com|Google Translate]] in the next tab. You can get the language codes [[http://www.loc.gov/standards/iso639-2/php/code_list.php|here]].

Then copy in the text below, paste the translation back from Google, specify the language, and save.

[form]
[t]
[r top][c]<(include site.language.template)>
[c]Language Name: [text title]
Language Code:  [text code]
[box translation rows=10 cols=40][box]
[submit]

!! Current Languages
<(search group=site.language type=-template fmt=title)>
[command languagecreator {=translation}]
[form]
[t]

It's pretty much self-explanatory.

If you add a line or two to the language template (site.language.template), you can repeat the process to update all the language packs and keep them current.

If you don't like some of Google's choices, edit them on the site language page, or even before saving. This script will overwrite any customizations in existing language files.