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 ]

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.

No multilanguage database project should be without one!

For news and updates visit the BabelKit home page:

http://www.webbysoft.com/babelkit

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 GNU General Public License (GPL) of the Free Software Foundation.

As a practical matter this means that you can use this software in house or as part of your web site. If you want to distribute this as part of a proprietary package ask me for a commercial license.