mirror of
https://github.com/boostorg/website.git
synced 2026-01-23 18:12:16 +00:00
30 lines
1.1 KiB
PHP
30 lines
1.1 KiB
PHP
<?php
|
|
# phpWebNotes - a php based note addition system
|
|
# Copyright (C) 2000-2002 Webnotes Team - webnotes-devel@sourceforge.net
|
|
# This program is distributed under the terms and conditions of the GPL
|
|
# See the files README and LICENSE for details
|
|
|
|
# --------------------------------------------------------
|
|
# $Id$
|
|
# --------------------------------------------------------
|
|
|
|
### --------------------
|
|
# Retrieves an internationalized string
|
|
# This function will return one of (in order of preference):
|
|
# 1. The string in the current user's preferred language (if defined)
|
|
# 2. The string in English
|
|
function lang_get( $p_string ) {
|
|
# note in the current implementation we always return the same value
|
|
# because we don't have a concept of falling back on a language. The
|
|
# language files actually *contain* English strings if none has been
|
|
# defined in the correct language
|
|
|
|
if ( isset( $GLOBALS['s_'.$p_string] ) ) {
|
|
return $GLOBALS['s_'.$p_string];
|
|
} else {
|
|
trigger_error( ERROR_LANG_STRING_NOT_FOUND, WARNING );
|
|
|
|
return '';
|
|
}
|
|
}
|
|
?>
|