aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrub <rub@piwigo.org>2008-01-30 22:16:01 +0000
committerrub <rub@piwigo.org>2008-01-30 22:16:01 +0000
commit7bb12f4f481639547b7aabd38eb044eb1f942c66 (patch)
tree5e175322389e678094ea0cae3a12c07e062d0a79
parent49b663ecec19a8b12f4986c2c2e8f193e2802366 (diff)
Replace old use of $lang by l10n function.
Merge BSF 2200:2201 into branch-1_7 git-svn-id: http://piwigo.org/svn/branches/branch-1_7@2202 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--admin/cat_list.php18
-rw-r--r--admin/cat_modify.php30
-rw-r--r--admin/cat_options.php28
-rw-r--r--admin/configuration.php16
-rw-r--r--admin/element_set.php2
-rw-r--r--admin/element_set_global.php2
-rw-r--r--admin/element_set_unit.php2
-rw-r--r--admin/group_list.php4
-rw-r--r--admin/group_perm.php6
-rw-r--r--admin/history.php2
-rw-r--r--admin/picture_modify.php2
-rw-r--r--admin/thumbnail.php52
-rw-r--r--admin/user_list.php10
-rw-r--r--admin/user_perm.php4
-rw-r--r--admin/ws_checker.php12
-rw-r--r--include/category_cats.inc.php2
-rw-r--r--include/common.inc.php8
-rw-r--r--include/functions_html.inc.php26
-rw-r--r--include/menubar.inc.php40
-rw-r--r--include/page_tail.php2
-rw-r--r--include/picture_rate.inc.php2
-rw-r--r--include/section_init.inc.php16
-rw-r--r--install.php68
23 files changed, 177 insertions, 177 deletions
diff --git a/admin/cat_list.php b/admin/cat_list.php
index e11e13b8b..aac736a21 100644
--- a/admin/cat_list.php
+++ b/admin/cat_list.php
@@ -71,7 +71,7 @@ $categories = array();
$base_url = PHPWG_ROOT_PATH.'admin.php?page=cat_list';
$navigation = '<a class="" href="'.$base_url.'">';
-$navigation.= $lang['home'];
+$navigation.= l10n('home');
$navigation.= '</a>';
// +-----------------------------------------------------------------------+
@@ -81,7 +81,7 @@ $navigation.= '</a>';
if (isset($_GET['delete']) and is_numeric($_GET['delete']) and !is_adviser())
{
delete_categories(array($_GET['delete']));
- array_push($page['infos'], $lang['cat_virtual_deleted']);
+ array_push($page['infos'], l10n('cat_virtual_deleted'));
ordering();
update_global_rank();
}
@@ -166,13 +166,13 @@ $template->assign_vars(array(
'CATEGORIES_NAV'=>$navigation,
'F_ACTION'=>$form_action,
- 'L_ADD_VIRTUAL'=>$lang['cat_add'],
- 'L_SUBMIT'=>$lang['submit'],
- 'L_STORAGE'=>$lang['storage'],
- 'L_NB_IMG'=>$lang['pictures'],
- 'L_MOVE_UP'=>$lang['up'],
- 'L_EDIT'=>$lang['edit'],
- 'L_DELETE'=>$lang['delete'],
+ 'L_ADD_VIRTUAL'=>l10n('cat_add'),
+ 'L_SUBMIT'=>l10n('submit'),
+ 'L_STORAGE'=>l10n('storage'),
+ 'L_NB_IMG'=>l10n('pictures'),
+ 'L_MOVE_UP'=>l10n('up'),
+ 'L_EDIT'=>l10n('edit'),
+ 'L_DELETE'=>l10n('delete'),
));
$tpl = array('cat_first','cat_last');
diff --git a/admin/cat_modify.php b/admin/cat_modify.php
index 63da625c5..6f3c4b075 100644
--- a/admin/cat_modify.php
+++ b/admin/cat_modify.php
@@ -113,7 +113,7 @@ WHERE ';
}
pwg_query($query);
- array_push($page['infos'], $lang['editcat_confirm']);
+ array_push($page['infos'], l10n('editcat_confirm'));
}
else if (isset($_POST['set_random_representant']))
{
@@ -262,20 +262,20 @@ $template->assign_vars(
'IMG_ORDER_DEFAULT' => empty($category['image_order']) ?
'checked="checked"' : '',
- 'L_EDIT_NAME' => $lang['name'],
- 'L_STORAGE' => $lang['storage'],
- 'L_REMOTE_SITE' => $lang['remote_site'],
- 'L_EDIT_COMMENT' => $lang['description'],
- 'L_EDIT_STATUS' => $lang['conf_access'],
- 'L_STATUS_PUBLIC' => $lang['public'],
- 'L_STATUS_PRIVATE' => $lang['private'],
- 'L_EDIT_LOCK' => $lang['lock'],
- 'L_EDIT_UPLOADABLE' => $lang['editcat_uploadable'],
- 'L_EDIT_COMMENTABLE' => $lang['comments'],
- 'L_YES' => $lang['yes'],
- 'L_NO' => $lang['no'],
- 'L_SUBMIT' => $lang['submit'],
- 'L_SET_RANDOM_REPRESENTANT'=>$lang['cat_representant'],
+ 'L_EDIT_NAME' => l10n('name'),
+ 'L_STORAGE' => l10n('storage'),
+ 'L_REMOTE_SITE' => l10n('remote_site'),
+ 'L_EDIT_COMMENT' => l10n('description'),
+ 'L_EDIT_STATUS' => l10n('conf_access'),
+ 'L_STATUS_PUBLIC' => l10n('public'),
+ 'L_STATUS_PRIVATE' => l10n('private'),
+ 'L_EDIT_LOCK' => l10n('lock'),
+ 'L_EDIT_UPLOADABLE' => l10n('editcat_uploadable'),
+ 'L_EDIT_COMMENTABLE' => l10n('comments'),
+ 'L_YES' => l10n('yes'),
+ 'L_NO' => l10n('no'),
+ 'L_SUBMIT' => l10n('submit'),
+ 'L_SET_RANDOM_REPRESENTANT'=>l10n('cat_representant'),
'U_JUMPTO' => make_index_url(
array(
diff --git a/admin/cat_options.php b/admin/cat_options.php
index 13f8d0b80..0a9b93e8f 100644
--- a/admin/cat_options.php
+++ b/admin/cat_options.php
@@ -154,8 +154,8 @@ $base_url = PHPWG_ROOT_PATH.'admin.php?page=cat_options&amp;section=';
$template->assign_vars(
array(
- 'L_SUBMIT'=>$lang['submit'],
- 'L_RESET'=>$lang['reset'],
+ 'L_SUBMIT'=>l10n('submit'),
+ 'L_RESET'=>l10n('reset'),
'U_HELP' => PHPWG_ROOT_PATH.'/popuphelp.php?page=cat_options',
@@ -238,9 +238,9 @@ SELECT id,name,uppercats,global_rank
;';
$template->assign_vars(
array(
- 'L_SECTION' => $lang['cat_upload_title'],
- 'L_CAT_OPTIONS_TRUE' => $lang['authorized'],
- 'L_CAT_OPTIONS_FALSE' => $lang['forbidden'],
+ 'L_SECTION' => l10n('cat_upload_title'),
+ 'L_CAT_OPTIONS_TRUE' => l10n('authorized'),
+ 'L_CAT_OPTIONS_FALSE' => l10n('forbidden'),
)
);
break;
@@ -259,9 +259,9 @@ SELECT id,name,uppercats,global_rank
;';
$template->assign_vars(
array(
- 'L_SECTION' => $lang['cat_comments_title'],
- 'L_CAT_OPTIONS_TRUE' => $lang['authorized'],
- 'L_CAT_OPTIONS_FALSE' => $lang['forbidden'],
+ 'L_SECTION' => l10n('cat_comments_title'),
+ 'L_CAT_OPTIONS_TRUE' => l10n('authorized'),
+ 'L_CAT_OPTIONS_FALSE' => l10n('forbidden'),
)
);
break;
@@ -280,9 +280,9 @@ SELECT id,name,uppercats,global_rank
;';
$template->assign_vars(
array(
- 'L_SECTION' => $lang['cat_lock_title'],
- 'L_CAT_OPTIONS_TRUE' => $lang['unlocked'],
- 'L_CAT_OPTIONS_FALSE' => $lang['locked'],
+ 'L_SECTION' => l10n('cat_lock_title'),
+ 'L_CAT_OPTIONS_TRUE' => l10n('unlocked'),
+ 'L_CAT_OPTIONS_FALSE' => l10n('locked'),
)
);
break;
@@ -301,9 +301,9 @@ SELECT id,name,uppercats,global_rank
;';
$template->assign_vars(
array(
- 'L_SECTION' => $lang['cat_status_title'],
- 'L_CAT_OPTIONS_TRUE' => $lang['cat_public'],
- 'L_CAT_OPTIONS_FALSE' => $lang['cat_private'],
+ 'L_SECTION' => l10n('cat_status_title'),
+ 'L_CAT_OPTIONS_TRUE' => l10n('cat_public'),
+ 'L_CAT_OPTIONS_FALSE' => l10n('cat_private'),
)
);
break;
diff --git a/admin/configuration.php b/admin/configuration.php
index 01eb474e8..20895dc88 100644
--- a/admin/configuration.php
+++ b/admin/configuration.php
@@ -80,7 +80,7 @@ if (isset($_POST['submit']) and !is_adviser())
{
if ( !url_is_remote($_POST['gallery_url']) )
{
- array_push($page['errors'], $lang['conf_gallery_url_error']);
+ array_push($page['errors'], l10n('conf_gallery_url_error'));
}
foreach( $main_checkboxes as $checkbox)
{
@@ -104,7 +104,7 @@ if (isset($_POST['submit']) and !is_adviser())
or $_POST['nb_comment_page'] < 5
or $_POST['nb_comment_page'] > 50)
{
- array_push($page['errors'], $lang['conf_nb_comment_page_error']);
+ array_push($page['errors'], l10n('conf_nb_comment_page_error'));
}
foreach( $comments_checkboxes as $checkbox)
{
@@ -146,7 +146,7 @@ WHERE param = \''.$row['param'].'\'
pwg_query($query);
}
}
- array_push($page['infos'], $lang['conf_confirmation']);
+ array_push($page['infos'], l10n('conf_confirmation'));
}
//------------------------------------------------------ $conf reinitialization
@@ -191,10 +191,10 @@ $action.= '&amp;section='.$page['section'];
$template->assign_vars(
array(
- 'L_YES'=>$lang['yes'],
- 'L_NO'=>$lang['no'],
- 'L_SUBMIT'=>$lang['submit'],
- 'L_RESET'=>$lang['reset'],
+ 'L_YES'=>l10n('yes'),
+ 'L_NO'=>l10n('no'),
+ 'L_SUBMIT'=>l10n('submit'),
+ 'L_RESET'=>l10n('reset'),
'U_HELP' => PHPWG_ROOT_PATH.'popuphelp.php?page=configuration',
@@ -280,7 +280,7 @@ switch ($page['section'])
{
// Reload user
$edit_user = build_user($conf['default_user_id'], false);
- array_push($page['infos'], $lang['conf_confirmation']);
+ array_push($page['infos'], l10n('conf_confirmation'));
}
}
$page['errors'] = array_merge($page['errors'], $errors);
diff --git a/admin/element_set.php b/admin/element_set.php
index fe005ee44..4d096a1e3 100644
--- a/admin/element_set.php
+++ b/admin/element_set.php
@@ -124,7 +124,7 @@ SELECT image_id
}
else if ('caddie' == $_GET['cat'])
{
- $page['title'] = $lang['caddie'];
+ $page['title'] = l10n('caddie');
$query = '
SELECT element_id
diff --git a/admin/element_set_global.php b/admin/element_set_global.php
index 568a37efb..bcafab4da 100644
--- a/admin/element_set_global.php
+++ b/admin/element_set_global.php
@@ -205,7 +205,7 @@ $template->assign_vars(
array(
'CATEGORIES_NAV'=>$page['title'],
- 'L_SUBMIT'=>$lang['submit'],
+ 'L_SUBMIT'=>l10n('submit'),
'U_DISPLAY'=>$base_url.get_query_string_diff(array('display')),
diff --git a/admin/element_set_unit.php b/admin/element_set_unit.php
index c58c53649..cefd8ee4c 100644
--- a/admin/element_set_unit.php
+++ b/admin/element_set_unit.php
@@ -140,7 +140,7 @@ $template->assign_vars(
array(
'CATEGORIES_NAV'=>$page['title'],
- 'L_SUBMIT'=>$lang['submit'],
+ 'L_SUBMIT'=>l10n('submit'),
'U_ELEMENTS_PAGE'
=>$base_url.get_query_string_diff(array('display','start')),
diff --git a/admin/group_list.php b/admin/group_list.php
index c5bd7ac70..2d8bbfbee 100644
--- a/admin/group_list.php
+++ b/admin/group_list.php
@@ -87,7 +87,7 @@ if (isset($_POST['submit_add']) and !is_adviser())
{
if (empty($_POST['groupname']))
{
- array_push($page['errors'], $lang['group_add_error1']);
+ array_push($page['errors'], l10n('group_add_error1'));
}
if (count($page['errors']) == 0)
{
@@ -100,7 +100,7 @@ SELECT COUNT(*)
list($count) = mysql_fetch_row(pwg_query($query));
if ($count != 0)
{
- array_push($page['errors'], $lang['group_add_error2']);
+ array_push($page['errors'], l10n('group_add_error2'));
}
}
if (count($page['errors']) == 0)
diff --git a/admin/group_perm.php b/admin/group_perm.php
index afec1fb09..0ddc4114d 100644
--- a/admin/group_perm.php
+++ b/admin/group_perm.php
@@ -141,9 +141,9 @@ $template->assign_vars(
get_groupname($page['group']
)
),
- 'L_CAT_OPTIONS_TRUE'=>$lang['authorized'],
- 'L_CAT_OPTIONS_FALSE'=>$lang['forbidden'],
- 'L_CAT_OPTIONS_INFO'=>$lang['permuser_info'],
+ 'L_CAT_OPTIONS_TRUE'=>l10n('authorized'),
+ 'L_CAT_OPTIONS_FALSE'=>l10n('forbidden'),
+ 'L_CAT_OPTIONS_INFO'=>l10n('permuser_info'),
'F_ACTION' =>
PHPWG_ROOT_PATH.
diff --git a/admin/history.php b/admin/history.php
index 2440a65e2..a80c14a1b 100644
--- a/admin/history.php
+++ b/admin/history.php
@@ -141,7 +141,7 @@ INSERT INTO '.SEARCH_TABLE.'
}
else
{
- array_push($page['errors'], $lang['search_one_clause_at_least']);
+ array_push($page['errors'], l10n('search_one_clause_at_least'));
}
}
diff --git a/admin/picture_modify.php b/admin/picture_modify.php
index 052b03330..5622c9b31 100644
--- a/admin/picture_modify.php
+++ b/admin/picture_modify.php
@@ -65,7 +65,7 @@ if (isset($_POST['date_creation_action'])
$_POST['date_creation_year'])
)
{
- array_push($page['errors'], $lang['err_date']);
+ array_push($page['errors'], l10n('err_date'));
}
}
diff --git a/admin/thumbnail.php b/admin/thumbnail.php
index 345d08b3e..44c749236 100644
--- a/admin/thumbnail.php
+++ b/admin/thumbnail.php
@@ -119,7 +119,7 @@ function RatioResizeImg($path, $newWidth, $newHeight, $tn_ext)
// creation and backup of final picture
if (!is_writable($tndir))
{
- array_push($page['errors'], '['.$tndir.'] : '.$lang['no_write_access']);
+ array_push($page['errors'], '['.$tndir.'] : '.l10n('no_write_access'));
return false;
}
imagejpeg($destImage, $dest_file);
@@ -140,14 +140,14 @@ function RatioResizeImg($path, $newWidth, $newHeight, $tn_ext)
// error
else
{
- echo $lang['tn_no_support']." ";
+ echo l10n('tn_no_support')." ";
if ( isset( $extenstion ) )
{
- echo $lang['tn_format'].' '.$extension;
+ echo l10n('tn_format').' '.$extension;
}
else
{
- echo $lang['tn_thisformat'];
+ echo l10n('tn_thisformat');
}
exit();
}
@@ -161,26 +161,26 @@ $stats = array();
$template->set_filenames( array('thumbnail'=>'admin/thumbnail.tpl') );
$template->assign_vars(array(
- 'L_THUMBNAIL_TITLE'=>$lang['tn_dirs_title'],
- 'L_UNLINK'=>$lang['tn_no_missing'],
- 'L_MISSING_THUMBNAILS'=>$lang['tn_dirs_alone'],
- 'L_RESULTS'=>$lang['tn_results_title'],
- 'L_PATH'=>$lang['path'],
- 'L_FILESIZE'=>$lang['filesize'],
- 'L_GENERATED'=>$lang['tn_results_gen_time'],
- 'L_THUMBNAIL'=>$lang['thumbnail'],
- 'L_PARAMS'=>$lang['tn_params_title'],
- 'L_GD'=>$lang['tn_params_GD'],
- 'L_CREATE'=>$lang['tn_params_create'],
- 'L_SUBMIT'=>$lang['submit'],
- 'L_REMAINING'=>$lang['tn_alone_title'],
- 'L_TN_STATS'=>$lang['tn_stats'],
- 'L_TN_NB_STATS'=>$lang['tn_stats_nb'],
- 'L_TN_TOTAL'=>$lang['tn_stats_total'],
- 'L_TN_MAX'=>$lang['tn_stats_max'],
- 'L_TN_MIN'=>$lang['tn_stats_min'],
- 'L_TN_AVERAGE'=>$lang['tn_stats_mean'],
- 'L_ALL'=>$lang['tn_all'],
+ 'L_THUMBNAIL_TITLE'=>l10n('tn_dirs_title'),
+ 'L_UNLINK'=>l10n('tn_no_missing'),
+ 'L_MISSING_THUMBNAILS'=>l10n('tn_dirs_alone'),
+ 'L_RESULTS'=>l10n('tn_results_title'),
+ 'L_PATH'=>l10n('path'),
+ 'L_FILESIZE'=>l10n('filesize'),
+ 'L_GENERATED'=>l10n('tn_results_gen_time'),
+ 'L_THUMBNAIL'=>l10n('thumbnail'),
+ 'L_PARAMS'=>l10n('tn_params_title'),
+ 'L_GD'=>l10n('tn_params_GD'),
+ 'L_CREATE'=>l10n('tn_params_create'),
+ 'L_SUBMIT'=>l10n('submit'),
+ 'L_REMAINING'=>l10n('tn_alone_title'),
+ 'L_TN_STATS'=>l10n('tn_stats'),
+ 'L_TN_NB_STATS'=>l10n('tn_stats_nb'),
+ 'L_TN_TOTAL'=>l10n('tn_stats_total'),
+ 'L_TN_MAX'=>l10n('tn_stats_max'),
+ 'L_TN_MIN'=>l10n('tn_stats_min'),
+ 'L_TN_AVERAGE'=>l10n('tn_stats_mean'),
+ 'L_ALL'=>l10n('tn_all'),
'U_HELP' => PHPWG_ROOT_PATH.'popuphelp.php?page=thumbnail',
@@ -254,11 +254,11 @@ if (isset($_POST['submit']))
// checking criteria
if (!ereg('^[0-9]{2,3}$', $_POST['width']) or $_POST['width'] < 10)
{
- array_push($page['errors'], $lang['tn_err_width'].' 10');
+ array_push($page['errors'], l10n('tn_err_width').' 10');
}
if (!ereg('^[0-9]{2,3}$', $_POST['height']) or $_POST['height'] < 10)
{
- array_push($page['errors'], $lang['tn_err_height'].' 10');
+ array_push($page['errors'], l10n('tn_err_height').' 10');
}
// picture miniaturization
diff --git a/admin/user_list.php b/admin/user_list.php
index 57149c295..b9310fde1 100644
--- a/admin/user_list.php
+++ b/admin/user_list.php
@@ -177,13 +177,13 @@ include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
check_status(ACCESS_ADMINISTRATOR);
$page['order_by_items'] = array(
- 'id' => $lang['registration_date'],
- 'username' => $lang['Username']
+ 'id' => l10n('registration_date'),
+ 'username' => l10n('Username')
);
$page['direction_items'] = array(
- 'asc' => $lang['ascending'],
- 'desc' => $lang['descending']
+ 'asc' => l10n('ascending'),
+ 'desc' => l10n('descending')
);
// +-----------------------------------------------------------------------+
@@ -834,7 +834,7 @@ foreach ($visible_user_list as $num => $local_user)
'GROUPS' => $groups_string,
'PROPERTIES' =>
(isset($local_user['enabled_high']) and ($local_user['enabled_high'] == 'true'))
- ? $lang['is_high_enabled'] : $lang['is_high_disabled']
+ ? l10n('is_high_enabled') : l10n('is_high_disabled')
)
);
trigger_action('loc_assign_block_var_local_user_list', $local_user);
diff --git a/admin/user_perm.php b/admin/user_perm.php
index cfe15842c..c5e2348d1 100644
--- a/admin/user_perm.php
+++ b/admin/user_perm.php
@@ -134,8 +134,8 @@ $template->assign_vars(
get_username($page['user']
)
),
- 'L_CAT_OPTIONS_TRUE'=>$lang['authorized'],
- 'L_CAT_OPTIONS_FALSE'=>$lang['forbidden'],
+ 'L_CAT_OPTIONS_TRUE'=>l10n('authorized'),
+ 'L_CAT_OPTIONS_FALSE'=>l10n('forbidden'),
'F_ACTION' =>
PHPWG_ROOT_PATH.
diff --git a/admin/ws_checker.php b/admin/ws_checker.php
index cec12d4e9..6a5efb4fc 100644
--- a/admin/ws_checker.php
+++ b/admin/ws_checker.php
@@ -157,7 +157,7 @@ VALUES (' . "
$template->assign_block_vars(
'update_result',
array(
- 'UPD_ELEMENT'=> $lang['ws_adding_legend'].$lang['ws_success_upd'],
+ 'UPD_ELEMENT'=> l10n('ws_adding_legend').l10n('ws_success_upd'),
)
);
}
@@ -179,14 +179,14 @@ if (isset($_POST['wsu_submit']))
$template->assign_block_vars(
'update_result',
array(
- 'UPD_ELEMENT'=> $lang['ws_update_legend'].$lang['ws_success_upd'],
+ 'UPD_ELEMENT'=> l10n('ws_update_legend').l10n('ws_success_upd'),
)
);
} else {
$template->assign_block_vars(
'update_result',
array(
- 'UPD_ELEMENT'=> $lang['ws_update_legend'].$lang['ws_failed_upd'],
+ 'UPD_ELEMENT'=> l10n('ws_update_legend').l10n('ws_failed_upd'),
)
);
}
@@ -205,15 +205,15 @@ if (isset($_POST['wsX_submit']))
$template->assign_block_vars(
'update_result',
array(
- 'UPD_ELEMENT'=> $lang['ws_delete_legend'].$lang['ws_success_upd'],
+ 'UPD_ELEMENT'=> l10n('ws_delete_legend').l10n('ws_success_upd'),
)
);
} else {
$template->assign_block_vars(
'update_result',
array(
- 'UPD_ELEMENT'=> $lang['Not selected / Not confirmed']
- .$lang['ws_failed_upd'],
+ 'UPD_ELEMENT'=> l10n('Not selected / Not confirmed')
+ .l10n('ws_failed_upd'),
)
);
}
diff --git a/include/category_cats.inc.php b/include/category_cats.inc.php
index a389a1595..83acade3b 100644
--- a/include/category_cats.inc.php
+++ b/include/category_cats.inc.php
@@ -201,7 +201,7 @@ if (count($categories) > 0)
array(
'SRC' => $thumbnail_src_of[$category['representative_picture_id']],
'ALT' => $category['name'],
- 'TITLE' => $lang['hint_category'],
+ 'TITLE' => l10n('hint_category'),
'ICON' => $icon_ts,
'URL' => make_index_url(
diff --git a/include/common.inc.php b/include/common.inc.php
index 00e68e646..f4fafa1c3 100644
--- a/include/common.inc.php
+++ b/include/common.inc.php
@@ -168,7 +168,7 @@ trigger_action('loading_lang');
// include/user.inc.php)
if ($user['is_the_guest'])
{
- $user['username'] = $lang['guest'];
+ $user['username'] = l10n('guest');
}
// template instance
@@ -197,11 +197,11 @@ if (isset($user['internal_status']['guest_must_be_guest'])
if ($conf['gallery_locked'])
{
- $header_msgs[] = $lang['gallery_locked_message'];
+ $header_msgs[] = l10n('gallery_locked_message');
if ( script_basename() != 'identification' and !is_admin() )
{
- echo $lang['gallery_locked_message']
+ echo l10n('gallery_locked_message')
.'<a href="'.get_absolute_root_url(false).'identification.php">.</a>';
exit();
}
@@ -232,7 +232,7 @@ SELECT id
if (is_adviser())
{
- $header_msgs[] = $lang['adviser_mode_enabled'];
+ $header_msgs[] = l10n('adviser_mode_enabled');
}
if (count($header_msgs) > 0)
diff --git a/include/functions_html.inc.php b/include/functions_html.inc.php
index 4fdbcf04a..0d5ae0d29 100644
--- a/include/functions_html.inc.php
+++ b/include/functions_html.inc.php
@@ -54,8 +54,8 @@ function get_icon($date, $is_child_date = false)
if ( !isset($page['get_icon_cache']['_icons_'] ) )
{
$icons = array(false => 'recent', true => 'recent_by_child' );
- $title = $lang['recent_image'].'&nbsp;'.$user['recent_period']
- .'&nbsp;'.$lang['days'];
+ $title = l10n('recent_image').'&nbsp;'.$user['recent_period']
+ .'&nbsp;'.l10n('days');
foreach ($icons as $key => $icon)
{
$icon_url = get_themeconf('icon_dir').'/'.$icon.'.png';
@@ -106,12 +106,12 @@ function create_navigation_bar(
{
$navbar.=
'<a href="'.$url.'" rel="start">'
- .$lang['first_page']
+ .l10n('first_page')
.'</a>';
}
else
{
- $navbar.= $lang['first_page'];
+ $navbar.= l10n('first_page');
}
$navbar.= ' | ';
// link on previous page ?
@@ -123,12 +123,12 @@ function create_navigation_bar(
'<a href="'
.$url.($previous > 0 ? $start_str.$previous : '')
.'" rel="prev">'
- .$lang['previous_page']
+ .l10n('previous_page')
.'</a>';
}
else
{
- $navbar.= $lang['previous_page'];
+ $navbar.= l10n('previous_page');
}
$navbar.= ' |';
@@ -194,12 +194,12 @@ function create_navigation_bar(
$navbar.=
'<a href="'.$url.$start_str.$next.'" rel="next">'
- .$lang['next_page']
+ .l10n('next_page')
.'</a>';
}
else
{
- $navbar.= $lang['next_page'];
+ $navbar.= l10n('next_page');
}
$navbar.= ' | ';
@@ -210,12 +210,12 @@ function create_navigation_bar(
$navbar.=
'<a href="'.$url.$start_str.$temp_start.'" rel="last">'
- .$lang['last_page']
+ .l10n('last_page')
.'</a>';
}
else
{
- $navbar.= $lang['last_page'];
+ $navbar.= l10n('last_page');
}
}
return $navbar;
@@ -566,9 +566,9 @@ function access_denied()
if ( isset($user['is_the_guest']) and !$user['is_the_guest'] )
{
- echo '<div style="text-align:center;">'.$lang['access_forbiden'].'<br />';
- echo '<a href="'.get_root_url().'identification.php">'.$lang['identification'].'</a>&nbsp;';
- echo '<a href="'.make_index_url().'">'.$lang['home'].'</a></div>';
+ echo '<div style="text-align:center;">'.l10n('access_forbiden').'<br />';
+ echo '<a href="'.get_root_url().'identification.php">'.l10n('identification').'</a>&nbsp;';
+ echo '<a href="'.make_index_url().'">'.l10n('home').'</a></div>';
exit();
}
else
diff --git a/include/menubar.inc.php b/include/menubar.inc.php
index aa3f490ca..604b66a49 100644
--- a/include/menubar.inc.php
+++ b/include/menubar.inc.php
@@ -171,8 +171,8 @@ if ( !$user['is_the_guest'] )
'special_cat',
array(
'URL' => make_index_url(array('section' => 'favorites')),
- 'TITLE' => $lang['favorite_cat_hint'],
- 'NAME' => $lang['favorite_cat']
+ 'TITLE' => l10n('favorite_cat_hint'),
+ 'NAME' => l10n('favorite_cat')
));
}
// most visited
@@ -180,8 +180,8 @@ $template->assign_block_vars(
'special_cat',
array(
'URL' => make_index_url(array('section' => 'most_visited')),
- 'TITLE' => $lang['most_visited_cat_hint'],
- 'NAME' => $lang['most_visited_cat']
+ 'TITLE' => l10n('most_visited_cat_hint'),
+ 'NAME' => l10n('most_visited_cat')
));
// best rated
if ($conf['rate'])
@@ -190,8 +190,8 @@ if ($conf['rate'])
'special_cat',
array(
'URL' => make_index_url(array('section' => 'best_rated')),
- 'TITLE' => $lang['best_rated_cat_hint'],
- 'NAME' => $lang['best_rated_cat']
+ 'TITLE' => l10n('best_rated_cat_hint'),
+ 'NAME' => l10n('best_rated_cat')
)
);
}
@@ -200,8 +200,8 @@ $template->assign_block_vars(
'special_cat',
array(
'URL' => get_root_url().'random.php',
- 'TITLE' => $lang['random_cat_hint'],
- 'NAME' => $lang['random_cat'],
+ 'TITLE' => l10n('random_cat_hint'),
+ 'NAME' => l10n('random_cat'),
'REL'=> 'rel="nofollow"'
));
@@ -210,16 +210,16 @@ $template->assign_block_vars(
'special_cat',
array(
'URL' => make_index_url(array('section' => 'recent_pics')),
- 'TITLE' => $lang['recent_pics_cat_hint'],
- 'NAME' => $lang['recent_pics_cat'],
+ 'TITLE' => l10n('recent_pics_cat_hint'),
+ 'NAME' => l10n('recent_pics_cat'),
));
// recent cats
$template->assign_block_vars(
'special_cat',
array(
'URL' => make_index_url(array('section' => 'recent_cats')),
- 'TITLE' => $lang['recent_cats_cat_hint'],
- 'NAME' => $lang['recent_cats_cat'],
+ 'TITLE' => l10n('recent_cats_cat_hint'),
+ 'NAME' => l10n('recent_cats_cat'),
));
// calendar
@@ -235,8 +235,8 @@ $template->assign_block_vars(
'chronology_view' => 'calendar'
)
),
- 'TITLE' => $lang['calendar_hint'],
- 'NAME' => $lang['calendar'],
+ 'TITLE' => l10n('calendar_hint'),
+ 'NAME' => l10n('calendar'),
'REL'=> 'rel="nofollow"'
)
);
@@ -293,8 +293,8 @@ $template->assign_block_vars(
$template->assign_block_vars(
'summary',
array(
- 'TITLE'=>$lang['hint_search'],
- 'NAME'=>$lang['search'],
+ 'TITLE'=>l10n('hint_search'),
+ 'NAME'=>l10n('search'),
'U_SUMMARY'=> get_root_url().'search.php',
'REL'=> 'rel="search"'
)
@@ -305,8 +305,8 @@ $template->assign_block_vars( 'summary.quick_search', array() );
$template->assign_block_vars(
'summary',
array(
- 'TITLE'=>$lang['hint_comments'],
- 'NAME'=>$lang['comments'],
+ 'TITLE'=>l10n('hint_comments'),
+ 'NAME'=>l10n('comments'),
'U_SUMMARY'=> get_root_url().'comments.php',
)
);
@@ -315,8 +315,8 @@ $template->assign_block_vars(
$template->assign_block_vars(
'summary',
array(
- 'TITLE' => $lang['about_page_title'],
- 'NAME' => $lang['About'],
+ 'TITLE' => l10n('about_page_title'),
+ 'NAME' => l10n('About'),
'U_SUMMARY' => get_root_url().'about.php',
)
);
diff --git a/include/page_tail.php b/include/page_tail.php
index 2a03cbd86..6317c9489 100644
--- a/include/page_tail.php
+++ b/include/page_tail.php
@@ -33,7 +33,7 @@ $template->assign_vars(
'VERSION' => $conf['show_version'] ? PHPWG_VERSION : '',
'PHPWG_URL' => PHPWG_URL,
- 'L_TITLE_MAIL' => urlencode($lang['title_send_mail']),
+ 'L_TITLE_MAIL' => urlencode(l10n('title_send_mail')),
));
//--------------------------------------------------------------------- contact
diff --git a/include/picture_rate.inc.php b/include/picture_rate.inc.php
index 172d02ceb..331cb41b0 100644
--- a/include/picture_rate.inc.php
+++ b/include/picture_rate.inc.php
@@ -42,7 +42,7 @@ SELECT COUNT(rate) AS count
$row = mysql_fetch_array(pwg_query($query));
if ($row['count'] == 0)
{
- $value = $lang['no_rate'];
+ $value = l10n('no_rate');
}
else
{
diff --git a/include/section_init.inc.php b/include/section_init.inc.php
index 86c1c35c0..cabfae546 100644
--- a/include/section_init.inc.php
+++ b/include/section_init.inc.php
@@ -217,7 +217,7 @@ if ('categories' == $page['section'])
}
else
{
- $page['title'] = $lang['no_category'];
+ $page['title'] = l10n('no_category');
}
if
@@ -337,7 +337,7 @@ SELECT DISTINCT(id)
$page,
array(
'title' => '<a href="'.duplicate_index_url(array('start'=>0)).'">'
- .$lang['search_result'].'</a>',
+ .l10n('search_result').'</a>',
)
);
}
@@ -367,7 +367,7 @@ SELECT image_id
$page = array_merge(
$page,
array(
- 'title' => $lang['favorites'],
+ 'title' => l10n('favorites'),
'items' => array_from_query($query, 'image_id'),
)
);
@@ -392,7 +392,7 @@ SELECT DISTINCT(id)
$page,
array(
'title' => '<a href="'.duplicate_index_url(array('start'=>0)).'">'
- .$lang['recent_pics_cat'].'</a>',
+ .l10n('recent_pics_cat').'</a>',
'items' => array_from_query($query, 'id'),
)
);
@@ -405,7 +405,7 @@ SELECT DISTINCT(id)
$page = array_merge(
$page,
array(
- 'title' => $lang['recent_cats_cat'],
+ 'title' => l10n('recent_cats_cat'),
)
);
}
@@ -430,7 +430,7 @@ SELECT DISTINCT(id)
$page,
array(
'title' => '<a href="'.duplicate_index_url(array('start'=>0)).'">'
- .$conf['top_number'].' '.$lang['most_visited_cat'].'</a>',
+ .$conf['top_number'].' '.l10n('most_visited_cat').'</a>',
'items' => array_from_query($query, 'id'),
)
);
@@ -456,7 +456,7 @@ SELECT DISTINCT(id)
$page,
array(
'title' => '<a href="'.duplicate_index_url(array('start'=>0)).'">'
- .$conf['top_number'].' '.$lang['best_rated_cat'].'</a>',
+ .$conf['top_number'].' '.l10n('best_rated_cat').'</a>',
'items' => array_from_query($query, 'id'),
)
);
@@ -479,7 +479,7 @@ SELECT DISTINCT(id)
$page,
array(
'title' => '<a href="'.duplicate_index_url(array('start'=>0)).'">'
- .$lang['random_cat'].'</a>',
+ .l10n('random_cat').'</a>',
'items' => array_from_query($query, 'id'),
)
);
diff --git a/install.php b/install.php
index a995f8777..bc3e3cb9c 100644
--- a/install.php
+++ b/install.php
@@ -242,27 +242,27 @@ if ( isset( $_POST['install'] ))
{
if ( @mysql_select_db($_POST['dbname'] ) )
{
- array_push( $infos, $lang['step1_confirmation'] );
+ array_push( $infos, l10n('step1_confirmation') );
}
else
{
- array_push( $errors, $lang['step1_err_db'] );
+ array_push( $errors, l10n('step1_err_db') );
}
}
else
{
- array_push( $errors, $lang['step1_err_server'] );
+ array_push( $errors, l10n('step1_err_server') );
}
$webmaster = trim(preg_replace( '/\s{2,}/', ' ', $admin_name ));
if ( empty($webmaster))
- array_push( $errors, $lang['step2_err_login1'] );
+ array_push( $errors, l10n('step2_err_login1') );
else if ( preg_match( '/[\'"]/', $webmaster ) )
- array_push( $errors, $lang['step2_err_login3'] );
+ array_push( $errors, l10n('step2_err_login3') );
if ( $admin_pass1 != $admin_pass2 || empty($admin_pass1) )
- array_push( $errors, $lang['step2_err_pass'] );
+ array_push( $errors, l10n('step2_err_pass') );
if ( empty($admin_mail))
- array_push( $errors, $lang['reg_err_mail_address'] );
+ array_push( $errors, l10n('reg_err_mail_address') );
else
{
$error_mail_address = validate_mail_address($admin_mail);
@@ -371,33 +371,33 @@ $template->assign_vars(
array(
'RELEASE'=>PHPWG_VERSION,
- 'L_BASE_TITLE'=>$lang['Initial_config'],
- 'L_LANG_TITLE'=>$lang['Default_lang'],
- 'L_DB_TITLE'=>$lang['step1_title'],
- 'L_DB_HOST'=>$lang['step1_host'],
- 'L_DB_HOST_INFO'=>$lang['step1_host_info'],
- 'L_DB_USER'=>$lang['step1_user'],
- 'L_DB_USER_INFO'=>$lang['step1_user_info'],
- 'L_DB_PASS'=>$lang['step1_pass'],
- 'L_DB_PASS_INFO'=>$lang['step1_pass_info'],
- 'L_DB_NAME'=>$lang['step1_database'],
- 'L_DB_NAME_INFO'=>$lang['step1_database_info'],
- 'L_DB_PREFIX'=>$lang['step1_prefix'],
- 'L_DB_PREFIX_INFO'=>$lang['step1_prefix_info'],
- 'L_ADMIN_TITLE'=>$lang['step2_title'],
- 'L_ADMIN'=>$lang['install_webmaster'],
- 'L_ADMIN_INFO'=>$lang['install_webmaster_info'],
- 'L_ADMIN_PASSWORD'=>$lang['step2_pwd'],
- 'L_ADMIN_PASSWORD_INFO'=>$lang['step2_pwd_info'],
- 'L_ADMIN_CONFIRM_PASSWORD'=>$lang['step2_pwd_conf'],
- 'L_ADMIN_CONFIRM_PASSWORD_INFO'=>$lang['step2_pwd_conf_info'],
- 'L_ADMIN_EMAIL'=>$lang['conf_mail_webmaster'],
- 'L_ADMIN_EMAIL_INFO'=>$lang['conf_mail_webmaster_info'],
- 'L_SUBMIT'=>$lang['Start_Install'],
- 'L_INSTALL_HELP'=>sprintf($lang['install_help'], 'http://forum.'.PHPWG_DOMAIN.'/'),
- 'L_ERR_COPY'=>$lang['step1_err_copy'],
- 'L_END_TITLE'=>$lang['install_end_title'],
- 'L_END_MESSAGE'=>$lang['install_end_message'],
+ 'L_BASE_TITLE'=>l10n('Initial_config'),
+ 'L_LANG_TITLE'=>l10n('Default_lang'),
+ 'L_DB_TITLE'=>l10n('step1_title'),
+ 'L_DB_HOST'=>l10n('step1_host'),
+ 'L_DB_HOST_INFO'=>l10n('step1_host_info'),
+ 'L_DB_USER'=>l10n('step1_user'),
+ 'L_DB_USER_INFO'=>l10n('step1_user_info'),
+ 'L_DB_PASS'=>l10n('step1_pass'),
+ 'L_DB_PASS_INFO'=>l10n('step1_pass_info'),
+ 'L_DB_NAME'=>l10n('step1_database'),
+ 'L_DB_NAME_INFO'=>l10n('step1_database_info'),
+ 'L_DB_PREFIX'=>l10n('step1_prefix'),
+ 'L_DB_PREFIX_INFO'=>l10n('step1_prefix_info'),
+ 'L_ADMIN_TITLE'=>l10n('step2_title'),
+ 'L_ADMIN'=>l10n('install_webmaster'),
+ 'L_ADMIN_INFO'=>l10n('install_webmaster_info'),
+ 'L_ADMIN_PASSWORD'=>l10n('step2_pwd'),
+ 'L_ADMIN_PASSWORD_INFO'=>l10n('step2_pwd_info'),
+ 'L_ADMIN_CONFIRM_PASSWORD'=>l10n('step2_pwd_conf'),
+ 'L_ADMIN_CONFIRM_PASSWORD_INFO'=>l10n('step2_pwd_conf_info'),
+ 'L_ADMIN_EMAIL'=>l10n('conf_mail_webmaster'),
+ 'L_ADMIN_EMAIL_INFO'=>l10n('conf_mail_webmaster_info'),
+ 'L_SUBMIT'=>l10n('Start_Install'),
+ 'L_INSTALL_HELP'=>sprintf(l10n('install_help'), 'http://forum.'.PHPWG_DOMAIN.'/'),
+ 'L_ERR_COPY'=>l10n('step1_err_copy'),
+ 'L_END_TITLE'=>l10n('install_end_title'),
+ 'L_END_MESSAGE'=>l10n('install_end_message'),
'F_ACTION'=>'install.php',
'F_DB_HOST'=>$dbhost,