Any plans to port this module to D7?
| Comment | File | Size | Author |
|---|---|---|---|
| #25 | domain_locale.zip | 14.57 KB | benoit.pointet |
| #22 | nebus_domain_locale.zip | 4.07 KB | fernly |
| #16 | domain_locale.zip | 16.59 KB | fernly |
| #15 | domain_locale.zip | 16.59 KB | fernly |
| #3 | domain_locale.tar_.gz | 11.84 KB | emilkarl |
Comments
Comment #1
nonsiePlans - yes. However my current job does not include Drupal development so I'll either get to it at some point or someone will need to pay me to do it. Patches are always more than welcome;)
Comment #2
Barfly commentedI understand ^^
I'll try to figure out how to patch this module when i have more skills in drupal api
Comment #3
emilkarl commentedI've made a port that seems to work. Havent cleaned it up, anyone wanna review it?
Comment #4
nonsieI'll take a look this weekend
Comment #5
dazz commentedi get the following notice when i enable the module.
Notice: Object of class DatabaseStatementBase could not be converted to int in domain_locale_install() (regel 34 van C:\wamp\www\drupal\sites\all\modules\contrib\domain_locale\domain_locale.install).
And when the module is enable the following message is always on top of every page
This form submits changes to your primary domain and may need to be entered from localhost.
I can select what languages should be enable for a domain but it doesn't seem to work. I'm not really sure what it is supposed to do, never used it on a D6 site but i keep getting all language in the language switcher or in the translation menu.
Maybe i'm just looking at this the wrong way but i thought it would be able to deactivated certain languages on different domains.
If i can help with something let me know.
Comment #6
agence web coheractio commentedHi,
I've fixed the install bug.
Just replace
by
in
domain_locale.installHowever, the module has no effect.
It seems that no hook gets triggered when viewing a node.
I am using
domain7.x-2.14.Laurent
Comment #7
dqdnonsie++
Thanks for this awesome contribution! Since I read that you have no time for that, I am willing to take over. I already brought up link module successfully to get ready for D7 release, awaited by 10+ users and I am willing to do the same here since I think this would be an awesome contribution to the Drupal community having i18n and Domain Access working fully together finally. Let me know what you think of it, if you still read this.
Comment #8
nonsieI took a look at the D7 port a while back and it has more issues than posted in #5 and #6. I'd love to see a port posted before adding someone else to the mix.
Comment #9
make77 commentedWith the code included in the archive posted by emilkarl, we had all languages links in the language switcher block even though we didn't have enabled all of them for the current domain.
This fonction alters links to only display enabled languages on the current domain.
Comment #10
make77 commentedFurthermore, this function redirects a path with an unabled language for the current domain to the default language domain path.
(from patch provided in http://drupal.org/node/1316904)
Comment #11
rudiedirkx commentedThe install bug is still a bug.
If you're doing
the
ifis always true, because it's aDatabaseQueryobject.I've changed it to this:
Comment #12
tararowell commentedVery interested to see how this port progresses. May even take a stab at it myself.
Subscribing
Comment #13
tararowell commentedI mashed up a D7 version of this module based on the posts in this thread. So far, the module works as expected with no errors.
nonsie, are you still planning to maintain this module if we come up with a decent D7 version? I would prefer that it be maintained by someone other than me since I am not thoroughly familiar with how it operates.
Comment #14
nonsieI'm planning on getting back to this and other modules I maintain at the end of this week.
Comment #15
fernly commentedI also mashed up a D7 version of this module that seems to do what it's supposed to do (see attachment).
I had to make one more change to domain_locale.module:
Change the code in the function domain_locale_domainwarnings():
Old code:
New code:
I always got this warning on every page that I had to submit the form from the primary domain. This fixes the warning message.
PS: The code is not cleaned up, it just works.. (in my case)
Comment #16
fernly commentedAs I upgraded to Domain Access 7.x-3.1 and because the UI of DA has slightly changed, I also updated the Domain Locale module to be compatible with it. You can find it in the attachment.
Again, this is no official release of the module (at all). It's a non-reviewed port of the D6 version of Domain Locale (only for Domain Access 7.x-3.0 and higher!), but it does the trick for now.
If you're looking for a working version for Domain Access 7.x-2.x, you can try the solution in #15.
Comment #17
khaled.zaidan commentedAny news here?
Comment #18
fernly commentedIf you are looking for a working D7 version, you can use #15 for Domain Access 7.x-2.x and #16 for Domain Access 7.x-3.x.
There is no official D7 release, yet.
Comment #19
fernly commentedApparently the D7 port is not working 100% yet.
Starting from #16, the following issue appears:
When the default language is set to english on a non-default domain, everything translates perfectly when switching to french (for example).
When french is set to default on the non-default domain, the website is only partly translated. For the moment I can't see a pattern. Some forms are translated, some are not. Even one menu item is translated, the others aren't.. Also Views pagers are translated, but the Views table headers and content aren't. And so on...
So when I use the language switcher in following cases I get these results:
English (default) => French = perfect translation
French (default) = partly translation
French (default) => English = perfect translation
English => French (default) = partly translation
The language prefix is always correct though.
When I set all languages (Drupal standard language form in Configuration, default domain language and subdomain language) I can possibly find to french, I still get the same results.
I'm wondering if the website would act the same without domain access, in that case it has nothing to do with domain_locale.
It's frustrating because everything works just fine starting from default language English...
Perhaps someone can point me in the right direction?
EDIT
Okay I figured it out:
When changing the default language for a subdomain from English to French, in the D7 multilingual system, the 'original text' of a translated string is labeled French under the hood (so now this 'French' original text, which was normally labeled English, has English content...) and an empty form field for an English translation appears. In the end, the French translation vanished untill the default language is set back to English.
Because I have no time at the moment to tune the domain_locale module, I'll add a quick fix in my case. If it works, I'll post it here.
Feel free to post a clean solution. I'm very curious how to fix this properly. Perhaps it's less difficult than I think it is?
Comment #20
fernly commentedI solved the problem. If anyone is interested, this is how I've done it in short:
If anyone has more questions about this, I'm willing to give more information about this solution.
As the D7 port is not yet there, I'll mark this issue as 'active'.
Comment #21
bb_dogg commentedlennartvv: would you mind posting you extra helper module as I'm very interested in your solution?
Also, do you have any idea on how to integrate this with the admin language module?
Comment #22
fernly commentedHi bb_dogg,
You can find the helper module in the attachment. Read the README file.
I have one more feature to add to this module: selecting the available languages per domain (which language is visible to the end-user in the language switcher), as the original form to do this can not be used anymore (English always has to be selected now..).
So it's not 100% ready yet, but it selects the correct default language per domain. I also added a path prefix for English on this page: admin/config/regional/language/edit/en. By default, English has no path prefix.
I don't know if it's really necessary, but I did it anyway.
Don't forget to use the domain_locale version from post #16 together with this module.
Please let me know if it helped you out, or if it didn't do anything at all :-)
PS: The namings in the module are related to the company I work at.
Comment #23
benoit.pointet commentedAny progresses in this D7 port?
nonsie: you did not give any news since beginning of december, 6 months ago, is it time to look for a new maintainer (I see there are volunteers)?
lennartvv: are the d7 ports + extra modules you posted on #16 and #22 still actual or did you apply changes since then?
Cheers,
b.
Comment #24
fernly commentedHi Benoit,
You can still use these modules. I haven't made any updates yet.
Comment #25
benoit.pointet commentedThanks lennartvv.
I added a drush command to the domain_locale module:
It obviously allows to set the locale settings for a domain thru drush.
Comment #26
Yuri commentedHi, would it be possible to post this as a dev version on the project page?
Comment #27
Yuri commentedI installed the #16#22 module combination and it apparently works...to the extend that the language switcher block does not work any more, shows the wrong language.
Also, I have English and Dutch as languages, and when I disable English and set Dutch as default language, the site gives a redirect loop.
Comment #28
Yuri commentedBy the way..the language field still allows selection of all languages, even after disabling some through the modules mentioned above.
The redirect loop is gone now (maybe clearing cache helped) but for some reason I can't disable the primary language that Drupal was installed with. Not sure if that is not supposed to be able with these modules. So basically for me English is always present even if I want only to show Dutch.
Comment #29
Yuri commentedAnother bug: In views, when the title field has been selected as 'Link this field to the original piece of content' and with the modules mentioned above, the default language is set to something other than the primary language the site has been installed in, the view shows titles that result in 'page not found' errors. There is problem that the url prefix is used together with the title of the original language, which combination is not valid. So, the default language settings should also change this behavior in views.
Comment #30
camdarley commentedComment #31
apemantus commentedYuri,
Re some of your bugs:
"the language field still allows selection of all languages, even after disabling some through the modules mentioned above."
This is not part of the scope of Domain Locale at the moment (see #747318: All languages shown as available ) - you can fix it pretty easily using hook_form_alter although.
"I have English and Dutch as languages, and when I disable English and set Dutch as default language, the site gives a redirect loop."
Are you using something like Global Redirect? Previous versions of that played funny with i18n.
Comment #32
apemantus commentedlennartvv,
I've installed your helper module; the rationale behind it makes sense to me and I think something like this should be in the proposed D7 version. However, would it break if the original (default) site was not in English. It's possible (I think) to set up Drupal 7 so the default language is, say, French (and uninstall English)? Is that a valid assumption (I get slightly confused with D7 and i18n)? Can we replace references to "en" with _nebus_fetch_default_prefix() and have
The other issue is I can't seem to remove English as a language for a domain, presumably as it's flagged as the default language in the radio button. Can we just remove $form['domain_language'][$lang_code]['site_default'] entirely from the form?
(One more thing is, there's also a "default language" setting on admin/structure/domain/view/$domain_id/config, which using the helper module is always English. Maybe for clarity this should either be removed or (preferably) overriden?)
Comment #33
apemantus commentedAh, sorry, I get it. Was being slow. So your helper modules relies on English being selected and being seen by Drupal as the default language, while actually overruling it with a custom "default" language. So you can't unselect English by design. Nnngh. Not sure how what I want (English site in English, German Site in German, Swiss site in both) is going to work.
Comment #34
mac_weber commentedD7 port released. Thanks to emilkarl, lennartvv, Laurent_, make77 and others who contributed to make it possible.
@lennartvv I don't understand how nebus_domain_locale would help. I got it to work without this helper module. Please open a new issue if you think this helper module is a need and post is as a patch.
@benoit.pointet I did not include the drush commands for now. If you want you can open a new issue and I will give you credit. Please, post it as a patch.
Comment #35
mac_weber commented