Set language index script

This commit is contained in:
q3aql 2024-12-16 20:47:47 +01:00
parent 36b818953c
commit 36c9b13daa
7 changed files with 113 additions and 0 deletions

14
lang/de.html Executable file
View File

@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="s" dir="ltr">
<head>
<meta charset="utf-8">
<link rel="shortcut icon" href=".res/folder.png">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Files - Über das HTTP(s)-Protokoll freigegebene Dateien</title>
<link rel="stylesheet" href=".res/bootstrap-dark.min.css">
</head>
<body class="bootstrap-dark">
<div class="container">
<h4><center><img src=".res/folder.png" width="25" height="25"> Files - Über das HTTP(s)-Protokoll freigegebene Dateien</center></h4>
<ul class="list-group">
<li class="list-group-item"><center><a href="../.index.html">Zurück <img src=".res/arrow.png" width="10" height="15"> Zum vorherigen Verzeichnis wechseln</a></center></li>

14
lang/en.html Executable file
View File

@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="s" dir="ltr">
<head>
<meta charset="utf-8">
<link rel="shortcut icon" href=".res/folder.png">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Files - Files shared via HTTP(s) protocol</title>
<link rel="stylesheet" href=".res/bootstrap-dark.min.css">
</head>
<body class="bootstrap-dark">
<div class="container">
<h4><center><img src=".res/folder.png" width="25" height="25"> Files - Files shared via HTTP(s) protocol</center></h4>
<ul class="list-group">
<li class="list-group-item"><center><a href="../.index.html">Back <img src=".res/arrow.png" width="10" height="15"> Go to previous directory</a></center></li>

14
lang/es.html Executable file
View File

@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="s" dir="ltr">
<head>
<meta charset="utf-8">
<link rel="shortcut icon" href=".res/folder.png">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Files - Archivos compartidos mediante el protocolo HTTP(s)</title>
<link rel="stylesheet" href=".res/bootstrap-dark.min.css">
</head>
<body class="bootstrap-dark">
<div class="container">
<h4><center><img src=".res/folder.png" width="25" height="25"> Files - Archivos compartidos mediante el protocolo HTTP(s)</center></h4>
<ul class="list-group">
<li class="list-group-item"><center><a href="../.index.html">Atrás <img src=".res/arrow.png" width="10" height="15"> Ir al directorio previo</a></center></li>

14
lang/fr.html Executable file
View File

@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="s" dir="ltr">
<head>
<meta charset="utf-8">
<link rel="shortcut icon" href=".res/folder.png">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Files - Fichiers partagés via le protocole HTTP(s)</title>
<link rel="stylesheet" href=".res/bootstrap-dark.min.css">
</head>
<body class="bootstrap-dark">
<div class="container">
<h4><center><img src=".res/folder.png" width="25" height="25"> Files - Fichiers partagés via le protocole HTTP(s)</center></h4>
<ul class="list-group">
<li class="list-group-item"><center><a href="../.index.html">Retour <img src=".res/arrow.png" width="10" height="15"> Aller au répertoire précédent</a></center></li>

14
lang/it.html Executable file
View File

@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="s" dir="ltr">
<head>
<meta charset="utf-8">
<link rel="shortcut icon" href=".res/folder.png">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Files - File condivisi tramite protocollo HTTP(s)</title>
<link rel="stylesheet" href=".res/bootstrap-dark.min.css">
</head>
<body class="bootstrap-dark">
<div class="container">
<h4><center><img src=".res/folder.png" width="25" height="25"> Files - File condivisi tramite protocollo HTTP(s)</center></h4>
<ul class="list-group">
<li class="list-group-item"><center><a href="../.index.html">Indietro <img src=".res/arrow.png" width="10" height="15"> Vai alla directory precedente</a></center></li>

14
lang/ru.html Executable file
View File

@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="s" dir="ltr">
<head>
<meta charset="utf-8">
<link rel="shortcut icon" href=".res/folder.png">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Files - Обмен файлами по протоколу HTTP(s)</title>
<link rel="stylesheet" href=".res/bootstrap-dark.min.css">
</head>
<body class="bootstrap-dark">
<div class="container">
<h4><center><img src=".res/folder.png" width="25" height="25"> Files - Обмен файлами по протоколу HTTP(s)</center></h4>
<ul class="list-group">
<li class="list-group-item"><center><a href="../.index.html">Назад <img src=".res/arrow.png" width="10" height="15"> Перейти в предыдущий каталог</a></center></li>

29
set-lang.sh Executable file
View File

@ -0,0 +1,29 @@
#!/bin/bash
dir=$(dirname $0)
lang_dir="$(dirname $0)/lang"
# List available languages
lang_available=$(ls -1 ${lang_dir}/ 2> /dev/null | cut -d "." -f 1)
# Set language
if [ -z "${1}" ] ; then
echo ""
echo "* Set language for html indexer"
echo ""
echo "Sintax: $0 <lang>"
echo ""
echo "Available lang:" ${lang_available}
echo ""
else
if [ -f "${lang_dir}/${1}.html" ] ; then
cp -rf "${lang_dir}/${1}.html" "${dir}/res/head.html"
echo "Language '${1}' set correctly"
echo "Run 'make-html-browser.sh' for to generate the html files"
exit 0
else
echo "Language '${1}' not available"
exit 1
fi
fi