Drupal multi-language redirection - drupal

I am developing a Drupal 7 site with multi-language, using only locales module. Two questions.
1.I made a custom "forgot my password" page, accessible through http://example.com/fr/user/password for french. Once I enter my email and click the button, it get redirected to /user, loosing the language on the way.
I wrote my own submit handler and redirect to another page without much success. It looks like on the submit, the form is rebuild, without the language in the url, and from that point on, everything is happening in the default language. How can I keep the language reference ?
2.Drupal core messages are not translated, like "Further instructions have been sent to your e-mail address.", even if its under the t().
Any help would be appreciated.
Thanks.

Losing the language may be because of how you have your detection set up. Language detection settings are at 'admin/config/regional/language/configure'. But it may also be because you are redirecting to the wrong language? How are you getting the url to redirect to?
You should use the l() function or url() function as I think these will respect the current language and give you the correct url.
You should be able to translate messages on the translate interface at: admin/config/regional/translate/translate

Related

How to replace language UniqueSeoCode from url

How to replace language UniqueSeoCode from url.
I need to manage language UniqueSeoCode from plugin. how to replace from plugin. if user selection any language from website but i need to redirect to only one language then how to do this ?
I try to do this from action filter based on CommonController of public website and then from this action filter i redirect to specific url. is this proper way or if you have any another proper way let me suggest please.
I need to redirect to customer to spefic language when customer directly open website(e.g. www.google.com) at the time in url does not contain any language so at this time i need to use my specif language.
now how to check that url contain language seocode or not.
if i use actionfilter on commonController at that time i always get language code? how to manage ?
UniqueSeoCode in url is not needed. NopCommerce can detect visitor browser language and browse website in this language. You can enable this option like below.
To configure localization settings go to Configuration → Settings → General settings
Tick the checkbox Automatically detect language for detecting language based on customer browser settings.

DNN Wrong Password Reset link

I have problems when I force reset passwords for my website users.
When I use this option, the next time the user logs in it will be prompted to change the password. My website link is something like this: Server/MyPortal.
When users login instead of taking them to:
Server/MyPortal/default.aspx?ctl=PasswordReset&resetToken...
They are redirected to:
Server/default.aspx?ctl=PasswordReset&resetToken...
Which obviously takes them to a 404 not found page because it is missing MyPortal.
Can anyone please shed some light on me and help me to fix this? Thank you very much!
Ivan
What version of DNN are you on?
I would look at
Are you on the latest version
Are your Portal Aliases configured properly. To tell this, login as a Super User, go to the Admin/Site Settings page for the portal in question, find the Portal Aliases section, I believe that is under the Advanced tab. See if you have a misconfigured alias in there.
Another thing you might check, would be to check the Language files (admin/languages) to see if the password reset email could be modified there to include the proper portal URL. When editing language files in DNN you can edit System, Host, or Site.
You likely want to edit the SITE level if you have other websites running as well. Site level edits will only apply to that individual portal.

Unable to "login" via twitter API

I have implemented a twitter login for my site, using a plugin called "Simple Twitter Connect".
Now what this plugin does is create a twitter login function for my site above the the comments section which allows users to use their twitter details rather than filling out name and email boxes.
Now the problem I am having with it is when it gets to the authorize page on twitter.com, after entering the details and then going back to the site it loads solicialize.gigaya.com page.
On the contents of the page it says
Failed connecting. Please try again later
I initially thought it must simply be something wrong with the plugin, however I have contacted the plugin author and he as said that gigya has nothing to do with his plugin nor does his plugin link to it.
I havent signed up to gigya nor implemented any of their functions on my site, so I'm not sure how this site gets into the equation.
If anyone wants to recreate the issue, the click here and login via twitter.
Can anyone suggest what the issue may be?
After the successful OAuth-Login you are redirected to the Callback URL associated with your Consumer key. The Callback URL can be configured - here's how you do it:
Log in to https://dev.twitter.com/apps
Select the application which you are using in your blog
Go to the "Settings" tab and you'll find the Callback URL under "Application Type"
Set the URL to your blog base directory (where the index.php is).

How to share a localized page in asp.net

I am using asp.net and I have implemented localization in a website where the users can switch between english and french, where english is the default language, I've added shareThis plugin in the pages, the issue is if a user switched to french and then shared the page on facebook or for example sent the page url in a mail to a friend to see, the page will open in english and not french, I know this is logic but the problem is the client wants the shared page to be in the language the user chose, meaning if am sharing the page in french then people will see it in french too.
Is there a solution for this issue?
Thanks in advance
This is where it's useful to use a URL scheme for localizing your web app. Instead of relying on session state, your web app can set the CurrentUICulture based on the request URL and your language switch can work by performing a redirect (e.g. to www.yourapp/fr for French). This way, when your French user shares the page, they'll be sharing www.yourapp/fr which always displays in French.

Drupal path alias not found

Got a Drupal6 install, and I'm using a webform to collect some data. The webform has a path alias set on the edit page as 'contact_us'. The issue that I can't figure out (and hard to reproduce) is from time to time, some users end up on the page 'node/'. Seems like that is a possible failure trying to find the alias or system path.
Any one seen this before? Any suggestions on some places to look or to why this is happening?
Do you have a module like path_redirect installed? Check to see that there is nothing trying to forward contact_us to node/.
Also, check that users have correct permission to access the form.
Also, 'domain.com/node' is the default homepage of Drupal. Are they submitting the form and being sent back to the homepage?
In a site where more than one language are enabled, in some circumstances Drupal doesn't find the correct URL alias for the language currently set for the user, and returns the Drupal canonical URL instead.
You didn't report if the Drupal site is multilanguage, and if there is an alias for that URL also in another language; I cannot suggest more possibilities without knowing that.

Resources