diff --git a/domain.module b/domain.module
index 599a836..b291740 100644
--- a/domain.module
+++ b/domain.module
@@ -1544,33 +1544,20 @@ function domain_domain_load(&$domain) {
  *
  * @param $domain
  *   The currently active $domain array, provided by domain_lookup().
+ * @param $language
+ *   An optional language object, passed when a language-sensitive path is
+ *   required. Normally, this may be left blank.
+ *
  * @return
  *   The base url of the requested domain.
  */
-function domain_get_path($domain) {
-  global $base_url;
-  if (empty($base_url)) {
-    return domain_check_scheme($domain['scheme']) . '://' . $domain['subdomain'];
-  }
-  // Badly malfored HTTP_HOST values can cause problems with PHP < 5.3.3,
-  // so we have to suppress error warnings for parse_url here.
-  // See php.net/manual/en/function.parse-url.php.
-  // See http://drupal.org/node/848856.
-  // With PHP > 5.1.2 we can pass a component parameter, too, but Drupal 6
-  // still supports PHP 4 and this code was originally tested there.
-  $url = array();
-  if ($_url = @parse_url($base_url)) {
-    $url = $_url;
-  }
-  // PHP 5 does not return an empty path element.
-  if (!isset($url['path'])) {
-    $url['path'] = '/';
-  }
-  // We need a trailing slash at the end of the path
-  if (substr($url['path'], -1) != '/') {
-    $url['path'] .= '/';
-  }
-  $path = domain_check_scheme($domain['scheme']) . '://' . $domain['subdomain'] . $url['path'];
+function domain_get_path($domain, $language = NULL) {
+  if (empty($language)) {
+    $path = domain_check_scheme($domain['scheme']) .'://'. $domain['subdomain'] . base_path();
+  }
+  else {
+    $path = domain_check_scheme($domain['scheme']) .'://'. $domain['subdomain'] . url('<front>');
+  }
   return $path;
 }
 
@@ -1579,11 +1566,14 @@ function domain_get_path($domain) {
  *
  * @param $domain
  *   The currently active $domain array, provided by domain_lookup().
+ * @param $language
+ *   An optional language object, passed when a language-sensitive path is
+ *   required.
  *
  * @return
  *   The absolute url to the current page on the requested domain.
  */
-function domain_get_uri($domain) {
+function domain_get_uri($domain, $language = NULL) {
   global $base_path;
   $modules = _domain_path_modules();
   if (!empty($modules) && !drupal_is_front_page()) {
@@ -1591,11 +1581,14 @@ function domain_get_uri($domain) {
     // call to url() below.
     $request_uri = request_path();
     $options = array();
+    if (!empty($language)) {
+      $options['language'] = $language;
+    }
     // If needed, let modules modify the path alias.
     // We cannot use URL here because we need the domain_id data.
     // TODO: use url() but pass a domain_id option?
     domain_path($domain['domain_id'], $request_uri, $options, $_GET['q']);
-    $request_uri = base_path() . $request_uri;
+    $request_uri = url($request_uri);
   }
   // The simple case just uses the inbound path, with the base path present.
   else {
diff --git a/domain_nav/domain_nav.module b/domain_nav/domain_nav.module
index 9474532..339a0f2 100644
--- a/domain_nav/domain_nav.module
+++ b/domain_nav/domain_nav.module
@@ -188,6 +188,7 @@ function domain_nav_block_save($delta = '', $edit = array()) {
  *   A themed HTML object for navigation.
  */
 function domain_nav_render($paths = NULL, $style = NULL) {
+  global $language;
   $_domain = domain_get_domain();
   if (!user_access('access domain navigation')) {
     return;
@@ -218,7 +219,7 @@ function domain_nav_render($paths = NULL, $style = NULL) {
       if ($_domain['subdomain'] == $value['subdomain']) {
         $value['active'] = TRUE;
       }
-      $path = $func($value);
+      $path = $func($value, $language);
       $value['path'] = $path;
       // Allow other modules to add elements to the array.
       $extra = array();
diff --git a/tests/domain.test b/tests/domain.test
index 684e974..b0613c2 100644
--- a/tests/domain.test
+++ b/tests/domain.test
@@ -411,6 +411,70 @@ class DomainSwitchingTest extends DomainTestCase {
   }
 }
 
+class DomainLinkTest extends DomainTestCase {
+
+  public static function getInfo() {
+    return array(
+      'name' => 'Domain links',
+      'description' => 'Ensure that domain link rewrites work as expected.',
+      'group' => 'Domain Access',
+    );
+  }
+
+  // On setup, install our test module.
+  function setUp($list = array()) {
+    parent::setUp($list);
+  }
+
+  // Test domain creation and switching.
+  function testDomainLinks() {
+    // Create some domains.
+    $result = $this->domainCreateDomains();
+    $_domain = domain_get_domain();
+
+    // Get the domain list.
+    $domains = domain_domains(TRUE);
+    // Check the path of each domain.
+    foreach ($domains as $domain) {
+      $path = domain_check_scheme($domain['scheme']) .'://'. $domain['subdomain'] . url('<front>');
+      $this->assertTrue($domain['path'] == $path, t('Path to domain %domain is %path.', array('%domain' => $domain['subdomain'], '%path' => $path)));
+    }
+
+    // Enable locale module and test again.
+    module_enable(array('locale'));
+    // Add French language.
+    $fields = array(
+      'language' => 'fr',
+      'name' => 'French',
+      'native' => 'Français',
+      'enabled' => 1,
+      'prefix' => 'fr'
+    );
+    db_insert('languages')
+      ->fields($fields)
+      ->execute();
+    cache_clear_all();
+    drupal_static_reset('language_list');
+    drupal_static_reset('language_types_configurable');
+
+    // @todo: proper language configuration.
+    global $language;
+    $languages = language_list('enabled');
+    $this->assertTrue(count($languages[1]) == 2, t('French language enabled.'));
+    $language = $languages[1]['fr'];
+
+    // Get the domain list.
+    $domains = domain_domains(TRUE);
+    // Check the path of each domain.
+    foreach ($domains as $domain) {
+      $path = domain_check_scheme($domain['scheme']) .'://'. $domain['subdomain'] . url('<front>');
+      $this->assertTrue($domain['path'] == $path && substr_count($path, 'fr') > 0, t('Language-specific path to domain %domain is %path.', array('%domain' => $domain['subdomain'], '%path' => $path)));
+    }
+
+  }
+}
+
+
 class DomainUnitTest extends DomainTestCase {
   public static function getInfo() {
     return array(
