[support] Wildcard country code in multilingual site

Cary Gordon listuser at chillco.com
Wed Oct 16 13:42:29 UTC 2013


You should revisit your multilingual strategy. There is little benefit in enabling languages that you don't support.

The language code does not actually manage the content language. It is tied to localization. You can override this, but again, you need an overall plan. It sounds like you are set to pickup the user's language from the browser. If the user is Portuguese and you do not have Portuguese  content, and you do not enable Portuguese, they will get the default language page.

OOTB, if you go to www.mydomain.com/fr/popup, and that content does not exist in French, you will get the default (presumably English) content for /popup, delivered at that URL. You can, with some effort, force this to www.mydomain.com/en/popup.

This is a simple answer to a potentially very complex question.

Thanks,

Cary

On Oct 16, 2013, at 4:24 AM, Idan Arbel <idan at pixelwrapped.com> wrote:

> Hello,
> 
> I'm trying to setup my site to work with another system that will link back to the site with a special url depending on the language of the user.
> 
> I will be getting links in this format: www.mydomain.com/country-code-in-2-char/popup
> 
> some of these pages will have a translated versions in the drupal site:
> 
> www.mydomain.com/fr/popup will lead to the french page, but some won't.
> 
> this works fine if the country code is enabled, but if it isn't it leads to a 404.
> 
> any way to create some kind of rule to check if the country code is active/enabled if not trim it out or redirect to the default language?
> 
> I can enable all the languages the come with drupal but I don't think that's the best solution...
> 
> this is drupal 7 btw.
> 
> Thanks
> 
> Idan
> -- 
> [ Drupal support list | http://lists.drupal.org/ ]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20131016/8e8be045/attachment.html 


More information about the support mailing list