rtl/ltr setting in language files
This commit is contained in:
parent
a495d8e448
commit
ddf7347f5d
|
@ -242,9 +242,9 @@ class QvitterAction extends ApiAction
|
|||
|
||||
// scan all files in the locale directory and create a json object with their change date added
|
||||
$available_languages = array_diff(scandir(QVITTERDIR.'/locale'), array('..', '.'));
|
||||
foreach($available_languages as $lan) {
|
||||
foreach($available_languages as $lankey=>$lan) {
|
||||
|
||||
$lancode = substr($lan,0,strpos($lan,'.'));
|
||||
print "\n".' "'.$lancode.'": "'.$lan.'?changed='.date('YmdHis',filemtime(QVITTERDIR.'/locale/'.$lan)).'",';
|
||||
|
||||
// also make an array with all language names, to use for generating menu
|
||||
$languagecodesandnames[$lancode]['english_name'] = Locale::getDisplayLanguage($lancode, 'en');
|
||||
|
@ -252,7 +252,20 @@ class QvitterAction extends ApiAction
|
|||
if(Locale::getDisplayRegion($lancode, $lancode)) {
|
||||
$languagecodesandnames[$lancode]['name'] .= ' ('.Locale::getDisplayRegion($lancode, $lancode).')';
|
||||
}
|
||||
if($lancode == 'es_ahorita') { $languagecodesandnames[$lancode]['name'] = 'español (ahorita)'; } // joke
|
||||
|
||||
// ahorita meme only on quitter.es
|
||||
if($lancode == 'es_ahorita') {
|
||||
if($siterootdomain == 'quitter.es') {
|
||||
$languagecodesandnames[$lancode]['name'] = 'español (ahorita)';
|
||||
}
|
||||
else {
|
||||
unset($available_languages[$lankey]);
|
||||
unset($languagecodesandnames[$lancode]);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
print "\n".' "'.$lancode.'": "'.$lan.'?changed='.date('YmdHis',filemtime(QVITTERDIR.'/locale/'.$lan)).'",';
|
||||
}
|
||||
?>
|
||||
|
||||
|
|
|
@ -333,11 +333,6 @@ $(window).load(function() {
|
|||
window.selectedLanguage = 'en';
|
||||
}
|
||||
|
||||
// if this is a RTL-language, add rtl class to body
|
||||
if(window.selectedLanguage == 'ar'
|
||||
|| window.selectedLanguage == 'fa') {
|
||||
$('body').addClass('rtl');
|
||||
}
|
||||
|
||||
// if we already have this version of this language in localstorage, we
|
||||
// use that cached version. we do this because $.ajax doesn't respect caching, it seems
|
||||
|
@ -367,6 +362,11 @@ $(window).load(function() {
|
|||
function proceedToSetLanguageAndLogin(data){
|
||||
window.sL = data;
|
||||
|
||||
// if this is a RTL-language, add rtl class to body
|
||||
if(window.sL.directionality == 'rtl') {
|
||||
$('body').addClass('rtl');
|
||||
}
|
||||
|
||||
window.siteTitle = $('head title').html(); // remember this for later use
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"directionality":"rtl",
|
||||
"languageName": "العربيّة",
|
||||
"loginUsername": "اسم المستخدم أو البريد الإلكترونيّ",
|
||||
"loginPassword": "كلمة المرور",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"directionality":"ltr",
|
||||
"languageName": "Asturianu",
|
||||
"loginUsername": "Nome d'usuariu o corréu-e",
|
||||
"loginPassword": "Contraseña",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"directionality":"ltr",
|
||||
"languageName": "Català",
|
||||
"loginUsername": "Nom d'usuari o correu electrònic",
|
||||
"loginPassword": "Contrasenya",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"directionality":"ltr",
|
||||
"languageName": "Deutsch",
|
||||
"loginUsername": "Benutzername oder E-Mail",
|
||||
"loginPassword": "Passwort",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"directionality":"ltr",
|
||||
"languageName": "English",
|
||||
"loginUsername": "Username or e-mail",
|
||||
"loginPassword": "Password",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"directionality":"ltr",
|
||||
"languageName": "Esperanto",
|
||||
"loginUsername": "Uzantnomo aŭ retpoŝtadreso",
|
||||
"loginPassword": "Pasvorto",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"directionality":"ltr",
|
||||
"languageName": "Español",
|
||||
"loginUsername": "Nombre de usuario o correo electrónico",
|
||||
"loginPassword": "Contraseña",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"directionality":"ltr",
|
||||
"languageName": "Español (ahorita)",
|
||||
"loginUsername": "Nombre de usuario o correo electrónico",
|
||||
"loginPassword": "Contraseña",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"directionality":"ltr",
|
||||
"languageName": "Euskara",
|
||||
"loginUsername": "Erabiltzaile edo emaila",
|
||||
"loginPassword": "Pasahitza",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"directionality":"rtl",
|
||||
"languageName": "فارسی",
|
||||
"loginUsername": "شناسه یا ایمیل",
|
||||
"loginPassword": "گذرواژه - رمز عبور",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"directionality":"ltr",
|
||||
"languageName": "Suomi",
|
||||
"loginUsername": "Käyttäjänimi tai sähköposti",
|
||||
"loginPassword": "Salasana",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"directionality":"ltr",
|
||||
"languageName": "Français",
|
||||
"loginUsername": "Nom d'utilisateur ou e-mail",
|
||||
"loginPassword": "Mot de passe",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"directionality":"ltr",
|
||||
"languageName": "Galego",
|
||||
"loginUsername": "Nome de usuario ou enderezo electrónico",
|
||||
"loginPassword": "Contrasinal",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"directionality":"rtl",
|
||||
"languageName": "עברית",
|
||||
"loginUsername": "שם משתמש או דוא״ל",
|
||||
"loginPassword": "סיסמה",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"directionality":"ltr",
|
||||
"languageName": "Ido",
|
||||
"loginUsername": "Uzantonomo od e-adreso",
|
||||
"loginPassword": "Pasovorto",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"directionality":"ltr",
|
||||
"languageName": "Italiano",
|
||||
"loginUsername": "Nome Utente o indirizzo email",
|
||||
"loginPassword": "Password",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"directionality":"ltr",
|
||||
"languageName": "Norsk",
|
||||
"loginUsername": "Brukernavn eller e-Post",
|
||||
"loginPassword": "Passord",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"directionality":"ltr",
|
||||
"languageName": "Português-Brasil",
|
||||
"loginUsername": "Nome de usuário ou e-mail",
|
||||
"loginPassword": "Senha",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"directionality":"ltr",
|
||||
"languageName": "Svenska",
|
||||
"loginUsername": "Användarnamn eller mejladress",
|
||||
"loginPassword": "Lösenord",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"directionality":"ltr",
|
||||
"languageName": "简体中文",
|
||||
"loginUsername": "用户名或邮件地址",
|
||||
"loginPassword": "密码",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"directionality":"ltr",
|
||||
"languageName": "繁體中文",
|
||||
"loginUsername": "使用者名稱或電子郵件",
|
||||
"loginPassword": "密碼",
|
||||
|
|
Loading…
Reference in New Issue
Block a user