mirror of
https://github.com/claudehohl/Stikked.git
synced 2025-04-25 20:41:20 -05:00
multilang first try
This commit is contained in:
parent
77ec34da7d
commit
3992b8297d
@ -64,7 +64,7 @@ $autoload['libraries'] = array('database', 'db_session', 'carabiner');
|
||||
| $autoload['helper'] = array('url', 'file');
|
||||
*/
|
||||
|
||||
$autoload['helper'] = array('url', 'date');
|
||||
$autoload['helper'] = array('url', 'date', 'language');
|
||||
|
||||
|
||||
/*
|
||||
|
@ -239,6 +239,7 @@ class Main extends CI_Controller
|
||||
$this->dbforge->add_key('hits_updated');
|
||||
$this->dbforge->add_column('pastes', $fields);
|
||||
}
|
||||
$this->lang->load('stikked', 'english');
|
||||
}
|
||||
|
||||
function _form_prep($lang = false, $title = '', $paste = '', $reply = false)
|
||||
|
@ -1,10 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>403 Forbidden</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>Directory access is forbidden.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
10
htdocs/application/language/english/stikked_lang.php
Normal file
10
htdocs/application/language/english/stikked_lang.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
$lang['paste_create_new'] = "No migrations were found.";
|
||||
$lang['migration_not_found'] = "This migration could not be found.";
|
||||
$lang['migration_multiple_version'] = "This are multiple migrations with the same version number: %d.";
|
||||
$lang['migration_class_doesnt_exist'] = "The migration class \"%s\" could not be found.";
|
||||
$lang['migration_missing_up_method'] = "The migration class \"%s\" is missing an 'up' method.";
|
||||
$lang['migration_missing_down_method'] = "The migration class \"%s\" is missing an 'down' method.";
|
||||
$lang['migration_invalid_filename'] = "Migration \"%s\" has an invalid filename.";
|
||||
|
@ -39,17 +39,17 @@
|
||||
*/
|
||||
if ( ! function_exists('lang'))
|
||||
{
|
||||
function lang($line, $id = '')
|
||||
function lang($index, $id = '')
|
||||
{
|
||||
$CI =& get_instance();
|
||||
$line = $CI->lang->line($line);
|
||||
$line = $CI->lang->line($index);
|
||||
|
||||
if ($id != '')
|
||||
{
|
||||
$line = '<label for="'.$id.'">'.$line."</label>";
|
||||
}
|
||||
|
||||
return $line;
|
||||
return ($line != '' ? $line : '[' . $index . ']');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
<form action="<?php echo base_url(); ?>" method="post">
|
||||
|
||||
<h1><?php if(!isset($page['title'])){ ?>
|
||||
Create a new paste
|
||||
<?php echo lang('paste_create_new'); ?>
|
||||
<?php } else { ?>
|
||||
<?php echo $page['title']; ?>
|
||||
<?php } ?></h1>
|
||||
|
Loading…
x
Reference in New Issue
Block a user