Description

Select translation implements a Views filter which allows you to select, for a group of nodes representing a same translation, which of the translation should be displayed.

The options are :

  • Use current language ; if not available use original language
  • Use current language ; if not available use default language ; if not available use original language
  • Provide a list of languages, so that the most appropriate language is selected. The list can contain the special values 'current', 'default' and 'original' for, respectively, the current language, the default language and the node's original language.

API

Select translation also provides an API to let users select the correct translation of a given node. This can be useful in code snippets, or when writing your own module. Given a node id, the function returns the node id to display, following the same algorithm as the view filter. Usage :

  <?php
    $my_nid
= select_translation_of_node($nid); // Uses 'default' mode
   
$my_nid = select_translation_of_node($nid, 'original'); // Uses 'original' algorithm
   
$my_nid = select_translation_of_node($nid, array('en', 'fr', 'current')); // Returns the best match
 
?>

Similar project : Active translation performs a similar function but it is not a Views filter - it acts on all queries of the whole site.

Compatibility

If you have i18n, you should set 'Content selection mode' to 'All content' in i18nsettings ( admin/settings/i18n )

Downloads

Version Downloads Date Links
6.x-0.x-dev tar.gz (7.99 KB) | zip (9.35 KB) 2011-Feb-25 Notes

Project Information

  • Module categories: Multilingual, Views
  • Maintenance status: Unknown
  • Development status: Unknown
  • Reported installs: 427 sites currently report using this module. View usage statistics.
  • Last modified: September 16, 2008

Maintainers for Select translation

Issues for Select translation

To avoid duplicates, please search before submitting a new issue.
All issues
Bug reports
Oldest open issue: 29 Dec 08