Exemplo n.º 1
0
/**
 * Display the oik-lib options page
 *
 * 
 */
function oik_lib_options_do_page()
{
    bw_context("textdomain", "oik-lib");
    oik_menu_header("library management");
    oik_box(null, null, "Options", "oik_lib_options");
    oik_box(null, null, "Registered libraries", "oik_lib_display_libraries");
    oik_menu_footer();
    bw_flush();
}
Exemplo n.º 2
0
 /**
  * Retrieve the text for localization from the global $bw_dtt array
  * 
  * Note: This function is called if we haven't already got a translated version
  * 
  * @param string $key - the key of the text to be translated
  * @return string - the text to be translated, for the currently selected textdomain
  */
 function bw_get_dtt($key)
 {
     global $bw_dtt;
     $context = bw_context("textdomain");
     if ($context) {
         $context_array = bw_array_get($bw_dtt, $context, null);
         if ($context_array) {
             $i18n = bw_array_get($context_array, $key, null);
         } else {
             $i18n = null;
         }
     } else {
         $i18n = null;
     }
     if (!$i18n) {
         $i18n = bw_array_get($bw_dtt, $key, $key);
     }
     return $i18n;
 }