Forums / General Questions / redirect language to another domain

redirect language to another domain

Locked

Views: 2,481

Results 1 to 10 of 10
This thread is locked. New replies are disabled.
15 Jan 2010, 6:49 AM
#1
djoel avatar

djoel

New Zenner

Join Date:
Aug 2009
Posts:
56
Plugin Contributions:
0

redirect language to another domain

Hello,

The scenario is as follows: I have an english and a german version of my shop. And I have 2 domains: "myshop.de" and "myshop.net".

For seo reasons I changed my parked .net domain to be an addon domain. Now I want my .de to be only german and my .net to be only english but still want the flags to be displayed in the shops on each site and to link to the respective site of the respective domain instead of to
<myshop/index.php?any_site=index&language=de/en>
avoiding making a rewrite rule for each site.

Has anyone an idea how this can be done?

Thank you

15 Jan 2010, 6:59 AM
#2
mprough avatar

mprough

Totally Zenned

Join Date:
Nov 2007
Location:
Woodbine, Georgia, United States
Posts:
4,304
Plugin Contributions:
39

Re: redirect language to another domain

Just hardlink them to the correct site

~Melanie

15 Jan 2010, 7:09 AM
#3
djoel avatar

djoel

New Zenner

Join Date:
Aug 2009
Posts:
56
Plugin Contributions:
0

Re: redirect language to another domain

Thank you for your quick reply!
I never created hardlinks.
Do I have to use my cpanel for that?

15 Jan 2010, 7:14 AM
#4
mprough avatar

mprough

Totally Zenned

Join Date:
Nov 2007
Location:
Woodbine, Georgia, United States
Posts:
4,304
Plugin Contributions:
39

Re: redirect language to another domain

You will need to modify the sidebox or header file (wherever the links currently are)

Something like this

  $content = "";
  $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent centeredContent">';

  $lng_cnt = 0;
  while (list($key, $value) = each($lng->catalog_languages)) {
    $content .= '[B]<a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('language', 'currency')) . 'language=' . $key, $request_type) . '">[/B]' . zen_image(DIR_WS_LANGUAGES .  $value['directory'] . '/images/' . $value['image'], $value['name']) . '</a>  ';
    $lng_cnt ++;
    if ($lng_cnt >= MAX_LANGUAGE_FLAGS_COLUMNS) {
      $lng_cnt = 0;
      $content .= '<br />';
    }
  }
$content .= '</div>';
?>

TO+==========

  $content = "";
  $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent centeredContent">';

  $lng_cnt = 0;
  while (list($key, $value) = each($lng->catalog_languages)) {
    $content .= '[B]<a href="http://domain.com/">[/B]' . zen_image(DIR_WS_LANGUAGES .  $value['directory'] . '/images/' . $value['image'], $value['name']) . '</a>  ';
    $lng_cnt ++;
    if ($lng_cnt >= MAX_LANGUAGE_FLAGS_COLUMNS) {
      $lng_cnt = 0;
      $content .= '<br />';
    }
  }
$content .= '</div>';
?>

If you cannot code, likely should get your designer to do it for you... Either way make a backup of the edited file first.

~Melanie

15 Jan 2010, 8:00 AM
#5
djoel avatar

djoel

New Zenner

Join Date:
Aug 2009
Posts:
56
Plugin Contributions:
0

Re: redirect language to another domain

I changed the code. And the flag links to the other domain But I faced the problem that I get directed to the language version from where I came from.

So now my idea is to remove the second language completely but I want the flags to be displayed nevertheless.
Is this possible and how?

15 Jan 2010, 8:37 AM
#6
mprough avatar

mprough

Totally Zenned

Join Date:
Nov 2007
Location:
Woodbine, Georgia, United States
Posts:
4,304
Plugin Contributions:
39

Re: redirect language to another domain

Configuration >> My Store >>

Switch To Default Language Currency - True
Language Selector - Default

~Melanie

15 Jan 2010, 8:53 AM
#7
djoel avatar

djoel

New Zenner

Join Date:
Aug 2009
Posts:
56
Plugin Contributions:
0

Re: redirect language to another domain

These are already my settings. I think the only solution is to remove the second languages and to find a way to make the flags shown up anyway. Maybe as a banner and direct them to the respective domain.

Thank you for keeping on helping!

16 Jan 2010, 6:09 AM
#8
djoel avatar

djoel

New Zenner

Join Date:
Aug 2009
Posts:
56
Plugin Contributions:
0

Re: redirect language to another domain

.... I solved it now by creating banners for the language flags directing to the respective domain. And I removed the second language completely.

However there is a little drawback: visitors will always be directed to the homepage of the other language. No matter in which page they click the flag.

19 Jan 2010, 7:51 PM
#9
shadowd avatar

shadowd

New Zenner

Join Date:
Dec 2009
Posts:
7
Plugin Contributions:
0

Re: redirect language to another domain

hi can you tell me how you did this.

i have 5 language packs installed and dont like the way they work so I was wanting to link each flag icon to the relevant google translate link. I tried changing the code as mentioned above in tpl.header.php but I am only able to put one url in so each flag has the same external google trans link which is no good.

any help will be greatly appreciated

24 Jan 2010, 4:36 PM
#10
djoel avatar

djoel

New Zenner

Join Date:
Aug 2009
Posts:
56
Plugin Contributions:
0

Re: redirect language to another domain

I created new banner in admin/tools/banner manager. But was not easy to get them to the place I wanted. I had to define them in my stylesheets.
Not sure if you can do it this way with five language flags.