]> git.plutz.net Git - shellwiki/blobdiff - handlers/10_translations.sh
various translations
[shellwiki] / handlers / 10_translations.sh
index e93b465e9ce2849d6c0aca8da3210d7178aa7da5..642d9c382030137b1b49fb680b363a0ef5c1a887 100755 (executable)
@@ -28,7 +28,9 @@ case ${PATH_INFO} in
     PATH_INFO="${PATH_INFO%:?*/\[attachment\]}[attachment]"
     ;;
   */:?*/\[*\])
-    :;;  # Default handler, considered valid in most cases
+    LANGUAGE="${PATH_INFO#*/:}"
+    LANGUAGE="${LANGUAGE%%/*}"
+    ;;
   */:?*/:?*)
     # Accidental double language link, last one stays valid!
     REDIRECT "${_BASE}${PATH_INFO%/:?*/:?*}/:${PATH_INFO##*/:}"
@@ -67,6 +69,7 @@ case ${PATH_INFO} in
     ;;
 esac
 
+_(){ printf %s\\n "$*"; }
 [ -r "${_EXEC}/l10n/${LANGUAGE}.sh" ] && . "${_EXEC}/l10n/${LANGUAGE}.sh"
 
 return 1