Not able to use different language for the user interface

wpanssi - November 6, 2008 - 22:15
Project:Preserve language
Version:6.x-0.x-dev
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed
Description

Does this work yet? I installed the module but when I select different language for the admin I still get same language as the default language..

#1

Anselm Heaton - November 7, 2008 - 10:05

It works here ! I wouldn't have done a dev release if it didn't !

Just to make sure we understand each other : by 'interface' language I mean the language of the menus, forms, etc. By 'content language' I mean the content of your articles, pages, etc.

Now, try the following :

1. Go to the settings page at /admin/settings/preserve_language

2. If 'preserve interface language on language links' is ticked, then language links (those that appears with an article to let you change the language of the article) should change only the content, and not the interface

3. If 'interface language switcher block' is ticked, then you get a new interface language block changer. However, you need to add that block to your page. so you can then go to 'blocks' (at /admin/build/block ) , and add the 'Interface language switcher' block to wherever you want it on your page. To avoid confusion, you should disable the existing language switcher block entitled 'Language switcher'. Now when you click on the language switcher, it should change the interface language but not that of the article.

Is this not what you are seeing ? If not, I'll need more information (what your settings are, how you select the different language, what exactly the effect is for both the interface and the content).

#2

wpanssi - November 8, 2008 - 12:15

There seems to be some trouble with my installation of the module, because I can't set permissions for the module. The module doesn't appear in the permission list although I have enabled it. So I can't access admin/settings/preserve_language.

Any clue why I can't see the module in the permission list?
Here are other modules I'm using:

admin menu

adsense core and api
adsense basic

cck
cck number
cck option widgets
cck text

color
comment
database logging
help
menu
php filter
poll
profile
search
taxonomy
update status

global redirect
imce
j_autovote
meta tags
page title
pathauto
poormanscron
scheduler
tinymce
token

views
views ui

workflow
workflow access

#3

Anselm Heaton - November 10, 2008 - 10:31

I see the problem - I forgot to implement hook_perm ! I'm a bit embarassed...

I'll implement this today, along with some other fixes. Expect a release by tonight/tomorrow morning.

#4

Anselm Heaton - November 10, 2008 - 10:32

In the mean time, you can see the settings page by logging in as the initial user (uid 1) who has the right to see everything.

#5

Anselm Heaton - November 11, 2008 - 11:08

Ok, the new release is there. Can you try it and let me know if it works ?

Thanks :)

#6

wpanssi - November 14, 2008 - 19:01

Now I can set permissions and also get to see admin/settings/preserve_language.
However, I can't see the Interface language switcher block even if I enable it.
And my interface language is the same as the default language. Changing the language for some specific user doesn't have any effect.

Do I need to have i18n to use this module??

#7

Anselm Heaton - November 17, 2008 - 10:52

However, I can't see the Interface language switcher block even if I enable it.

The language switcher block will only be available if :

  1. You have enabled it in admin/settings/preserve_language ;
  2. You have at least two languages enabled ;
  3. You have set URL-based language negotiation. On this page /admin/settings/language/configure , you need to select one of the language negotiations (prefix / prefix + fallback / domain). The reason is that without this it's not possible to create links that change the language ;
  4. You have displayed the block on your page (at /admin/build/block )

Do I need to have i18n to use this module??

In theory no, though I have not tried without. If it still doesn't work after checking the items above, you may want to install i18n and see if it makes a difference (or I could try without - but I'm really busy right now so won't have time for a while).

#8

wpanssi - November 20, 2008 - 08:35

Ok, now I can see the language switcher block. I had language negotiation set to none.
However, if language negotiation is set to "Domain name only", using language switcher does nothing. The interface language remains the same.

#9

wpanssi - November 24, 2008 - 17:44

I have now language negotiation set to Path prefix with language fallback. I'm logged in as admin and I have set english as my language. When trying to use language switcher to switch language nothing happens. Either I have misunderstood the function of this module or then it doesn't work as it is supposed to.

#10

Anselm Heaton - November 25, 2008 - 16:09

In your scenario, clicking on one of the languages in the language switcher should redirect to the current node, but changing the language in the path prefix.

So if you're at '/en/node/31' clicking on french should take you to '/fr/node/31'.

When you say 'nothing happens' - what do you mean ? Are the items in the language switcher block not links ? If they are links, which path do they take you to ?

#11

wpanssi - November 30, 2008 - 19:37

I had to languages, en & fi. I had empty string as a language prefix in finnish while having en for english. I added language prefix and now I can change the language.

The reason I try to avoid using language prefixes is duplicate content. Now I have exactly the same content with mysite.com and mysite.com/fi

Maybe I should create another issue/post concerning duplicate content? Though it's not related to this module but the drupal language system in general..

#12

Anselm Heaton - February 4, 2009 - 13:41
Status:active» closed

Hi (and sorry for the delay in replying),

Yes - your issue is to do with the Drupal language system rather than this module. I've added some explanation on the project page about the requirements for the language switcher block so that other people won't have the same problem ; there's not much more I can do beyond this so I'm closing this ticket.

Thanks for helping me work some of these things out.

 
 

Drupal is a registered trademark of Dries Buytaert.