Forums | Mahara Community

Support /
Language on Public pages


anonymous profile picture
Account deleted
Posts: 109

09 January 2012, 9:10

Hi, how can one display the language of the user when the user surfs onto public Mahara pages? I.e. if I come from France then French is displayed, and if I come from a Spanish speaking country then Spanish is displayed etc. Can Mahara identify which language the browser is in, or where the IP-address comes from?

BR / Jonas

09 January 2012, 9:59

Dear Jonas,

It seems to me that Mahara doesn't have an automatic language switcher system, and so doesn't recognize access from foreign browsers.

When you provide multiple language portfolio, you can add on the top of each page a language menu with links to the main page of each language in which you portoflio is written.

Using collections of pages, you can easy create a collection per language and having a menu page that let the user decide in which language he wishes to access the pages.

Hope that helps

-dajan

anonymous profile picture
Account deleted
Posts: 109

09 January 2012, 13:33

Thanks a lot Dajan! One follow-up question, is it possible to somehow in the url include which language should be displayed? / Cheers, Jonas

anonymous profile picture
Account deleted
Posts: 808

09 January 2012, 14:43

Hi Jonas,

If you have multiple languages installed, so that you get the language drop-down on the home page when logged-out, you can just add "?lang=xx.utf8" to the url of any of the logged-out pages.  I don't think that works when you're logged in though, you have to go to the settings page and change the language preference.

09 January 2012, 16:44

I agree Richard

This will change the interface but I think that Jonas wanted to access different parts of his ePortfolio according to language detection.

I think this is something we already discussed during Mahara UK 11 or 10 and was about a feature you wanted to implement in the future. Having a ePortfolio system with an embedded multilingual system, would foster use of Mahara for foreign language teaching and let provide Resume to mere languages, according to the context the user try to find a working position.

-dajan

anonymous profile picture
Account deleted
Posts: 109

10 January 2012, 0:09

Thanks a lot Richard! So if the url of the page I want to display is this   https://devel.card.coop/cp/group/view.php?id=2  and I would like to have the interface in French, what would the full url look like then?

For example, if a French user, with the language set to French, sends a url to a public page of his, to one of his French friends, it would be great if that page automatically had the French interface, as the content  already is in French.

Cheers, Jonas

 

anonymous profile picture
Account deleted
Posts: 808

10 January 2012, 14:51

The first url parameter starts with '?', but additional parameters start with '&', so in your case you'd use https://devel.card.coop/cp/group/view.php?id=2&lang=fr.utf8 - but remember, it'll only work if you're logged out.

This is also fairly recent.  I think it works in 1.4, but won't work on older versions - the 'lang' parameter was only handled on the front page.

anonymous profile picture
Account deleted
Posts: 109

10 January 2012, 15:44

This is great, thanks a lot Richard!

Best regards, Jonas

11 January 2012, 3:35

Ok Richard,

I have tried again and it works. But WHY does it work only when your are logged out? What is the reason?

I think that this feature should be accessible whenever you are connected or not.

Cheers,

-dajan

Edits to this post:

anonymous profile picture
Account deleted
Posts: 808

11 January 2012, 14:45

Hi Dominique-Alain,

It only works when logged out because it's really an accidental side-effect of the language drop-down, which also passes a 'lang' parameter.  So it only works where the drop-down might be submitted, and that's only when you're logged out.  At the time, it didn't occur to me that anyone would want to use it in a url.

14 results