]> git.plutz.net Git - shellwiki/blobdiff - handlers/10_translations.sh
Merge commit 'fb88510e7c955308c1321678f97a8f7d47b92efd'
[shellwiki] / handlers / 10_translations.sh
index e93b465e9ce2849d6c0aca8da3210d7178aa7da5..5067677ac4db48107ee0d433ca93d9970f475a56 100755 (executable)
@@ -1,5 +1,7 @@
 #!/bin/sh
 
+_(){ printf %s\\n "$*"; }
+
 # Set LANGUAGE_DEFAULT to enable Plugin
 [ ! "$LANGUAGE_DEFAULT" ] && return 1
 
@@ -28,7 +30,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##*/:}"