Currently, if you use epublish and Internationalition together, you have to create a different publication for each language. This of course, somewhat defeats the purpose of i18n. But, you can tell epublish to check if there is a translation available, and if so, use that link instead.

In the layout.inc files, add these four lines right after the foreach ($topic->nodes as $nid) { :

if (module_exist('translation')) {
 $lang = i18n_get_lang();
 $transnid .= translation_node_nid($nid, $lang);
 if ($transnid) { $nid = $transnid; $transnid = '';}
}

It uses translation_node_nid to determine if a translation is available in the user's current selected language. If it is, it loads the corresponding $nid instead of the first-language version.

Is this a suitable patch for the module? There may be a better way to code this...

Comments

matt@antinomia’s picture

Assigned: Unassigned » matt@antinomia

FYI, I will be testing this code in the upcoming weeks.

Patricia Barden’s picture

Status: Needs review » Closed (fixed)

OK, we've added this patch to both the 4.6 and 4.7 versions. Thanks!