/**
* @brief Returns the preferred language from the HTTP_ACCEPT_LANGUAGE header
* @return string The two-letter language code
/**
* @brief Returns the preferred language from the HTTP_ACCEPT_LANGUAGE header
* @return string The two-letter language code
// check if we have translations for the preferred languages and pick the 1st that has
foreach ($lang_list as $lang) {
if ($lang === 'en' || (file_exists("view/lang/$lang") && is_dir("view/lang/$lang"))) {
// check if we have translations for the preferred languages and pick the 1st that has
foreach ($lang_list as $lang) {
if ($lang === 'en' || (file_exists("view/lang/$lang") && is_dir("view/lang/$lang"))) {
* @brief Stores the current language strings and load a different language.
* @param string $lang Language code
* @brief Stores the current language strings and load a different language.
* @param string $lang Language code
* Uses an App object shim since all the strings files refer to $a->strings
*
* @param string $lang language code to load
* Uses an App object shim since all the strings files refer to $a->strings
*
* @param string $lang language code to load
// load enabled addons strings
$addons = DBA::select('addon', ['name'], ['installed' => true]);
while ($p = DBA::fetch($addons)) {
// load enabled addons strings
$addons = DBA::select('addon', ['name'], ['installed' => true]);
while ($p = DBA::fetch($addons)) {
if (file_exists("addon/$name/lang/$lang/strings.php")) {
include "addon/$name/lang/$lang/strings.php";
}
if (file_exists("addon/$name/lang/$lang/strings.php")) {
include "addon/$name/lang/$lang/strings.php";
}
- * value is array containing past tense verb, translation of present, translation of past
+ * value is array containing past tense verb, translation of present, translation of past
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
'rebuff' => ['rebuffed', self::t('rebuff'), self::t('rebuffed')],
];
'rebuff' => ['rebuffed', self::t('rebuff'), self::t('rebuffed')],
];