Welcome

BoltWire is a content management system developed by Dan Vis.

Modules
Plugins
Skins
Languages



Popular Posts

Version 5.11 Released
May 26, 2016

Big Changes Coming Soon...
April 28, 2016

Catching Up
April 6, 2016



Other Sites

Here's some other sites by Dan Vis:

Alexa Echoes
Join my adventures developing for Amazons exciting new voice platform.

Firefly Spot
Personal rambling about new gadgets, technology news, and space travel.

FAST Missions
My ministry hub, with news and updates about our online school.

You can follow him at www.danvis.info.

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.