NAME

DBIx::BabelKit - Universal Multilingual Code Table Interface

SYNOPSIS

 use DBIx::BabelKit;

 my $bk = new DBIx::BabelKit($dbh,
                table     => 'bk_code',
                getparam  => sub { $cgi->param(shift) },
                getparams => sub { $cgi->param(shift.'[]') }
                );

Get code descriptions safe for HTML display

 $str = $bk->desc(   $code_set, $code_lang, $code_code);
 $str = $bk->ucfirst($code_set, $code_lang, $code_code);
 $str = $bk->ucwords($code_set, $code_lang, $code_code);

Get code descriptions not safe for HTML display

 $str = $bk->render($code_set, $code_lang, $code_code);
 $str = $bk->data(  $code_set, $code_lang, $code_code);
 $str = $bk->param( $code_set, $code_code)

HTML select common options

        var_name      => 'start_day'
        value         => $start_day
        default       => 1
        subset        => [ 1, 2, 3, 4, 5 ]
        options       => 'onchange="submit()"'

HTML select single value methods

 $str = $bk->select($code_set, $code_lang,
        select_prompt => "Code set description?",
        blank_prompt  => "None"
        );

 $str = $bk->radio($code_set, $code_lang,
        blank_prompt  => "None",
        sep           => "<br>\n"
        );

HTML select multiple value methods

 $str = $bk->multiple($code_set, $code_lang,
        size          => 10
        );

 $str = $bk->checkbox($code_set, $code_lang,
        sep           => "<br>\n"
        );

Code sets

 $rows = $bk->lang_set($code_set, $code_lang);
 $rows = $bk->full_set($code_set, $code_lang);

Code table updates

 $bk->slave($code_set, $code_code, $code_desc);

 $bk->remove($code_set, $code_code);

 ( $code_desc, $code_order, $code_flag ) =
   $bk->get($code_set, $code_lang, $code_code);

 $bk->put($code_set, $code_lang, $code_code,
          $code_desc, $code_order, $code_flag);

DESCRIPTION

BabelKit is an interface to a universal multilingual database code table. BabelKit takes all of the programming work out of maintaining multiple database code definition sets in multiple languages.

The code administration and translation page lets you define new virtual code tables, new languages, enter all codes and their descriptions and then translate them into all languages of interest.

Perl and PHP classes retrieve the code descriptions and automatically generate HTML code selection elements in the user's language. This makes internationalization and localization of web sites and database interfaces much easier.

For news and updates visit the BabelKit home page:

http://www.webbysoft.com/babelkit

SEE ALSO

For a simpler unilingual universal code table visit the CodeKit home page:

http://www.webbysoft.com/codekit

AUTHOR

Contact John Gorman at http://www.webbysoft.com to report bugs, request features, or for database design and programming assistance.

COPYRIGHT

Copyright (C) 2003 John Gorman. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl or the LGPL.