wikidoku
Dies ist eine alte Version des Dokuments!
Inhaltsverzeichnis
Wiki Dokumentation
Allfällige hacks und spezielle Einstellungen werden hier (hoffentlich) Dokumentiert.
plugin:translation
Language selector
Adding the selector to the theme
Problems with url rewriting
When using the language selector to switch in between de:
and en:
url-rewriting would not work properly.
We where getting of en:start
, start/?id=de:start
and de:start
, start/?id=en:start
\\.
We found the problem to be that script.js
expects the base-url to end with /
when url-rewriting is active. In our case However, it end with /start
.
We implemented the following workaround to fix this:
/var/www/wiki/lib/plugins/translation/script.js
// this should hopefully detect rewriting good enough: var action = $frm.attr('action'); if(action.substr(action.length-1) == '/'){ var link = action + id; }
was replaced with:
// this should hopefully detect rewriting good enough: var action = $frm.attr('action').replace('/start', '/'); if(action.substr(action.length-1) == '/'){ var link = action + id; }
Nicer breadcrumbs
wikidoku.1452536554.txt.gz · Zuletzt geändert: 2020/09/19 22:03 (Externe Bearbeitung)