Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lingua_selector #46

Open
Hal100000 opened this issue Oct 12, 2015 · 3 comments
Open

lingua_selector #46

Hal100000 opened this issue Oct 12, 2015 · 3 comments

Comments

@Hal100000
Copy link

I got Lingua working - it is great. However I have two questions/issues:
#1: I'm using it for two languages (English and German) and the lingua_selector displays sometimes "Select language" and sometimes "lingua.select_language"
#2: The language selector does something weird with pages which do not have an .html at the end

For issue #1: http://nde-consulting.com/dr.-johannes-vrana.html
For issue #2 (and #1): http://nde-consulting.com/

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@Hal100000
Copy link
Author

I "solved" issue #1. The issue is that lingua.select_language is defined in components/lingua/lexicon/en/default.inc.php and that somehow by switching the language the chunk wants to read a different language from the lesxicon - but Lingua only provides en. I "solved" it by just hardcoding "Select language" in the chunk.

@Hal100000
Copy link
Author

Found also a bug fix for issue 2:

Replace
$pageURL = http_build_url($pageURL, $parseUrl);
with
$pageURL = http_build_url($parseUrl);

and replace
$pageURL = $parseUrl['scheme'] . '://' . $parseUrl['host'] . '/' . $parseUrl['path'] . $itemUri;
with
if (strstr($parseUrl['path'],$itemUri))
{$pageURL = $parseUrl['scheme'] . '://' . $parseUrl['host'] . $parseUrl['path'];}
else
{$pageURL = $parseUrl['scheme'] . '://' . $parseUrl['host'] . $parseUrl['path'] . $itemUri;}

@bobbwal
Copy link

bobbwal commented Dec 16, 2015

You can also solve issue #1 by creating a lexicon for each language you're using and adding the lexicon entry for lingua_selector for each langauge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants