Multilingual Option for i18n [with workaround]

blecheimer - June 13, 2009 - 12:31
Project:Ubercart Out of stock Notification
Version:6.x-1.3
Component:User interface
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs review
Description

The multilingual display of "out of stock" is not possible by setting this textarea as multilingual variable is not working.

here is a workaround:

<?php
$language
= i18n_get_lang();
// echo $language; // test if $language is not empty

if ($language == "es") {
// first language option (es)
print "<span class=\"uc-outofstock\">PLACE THE TEXT HERE IN SPANISH</span>";}
else if (
$language == "de") {
// second language option (de)
print "<span class=\"uc-outofstock\">PLACE THE TEXT HERE IN GERMAN</span>";}
else {
// if no language or english print this:
print "<span class=\"uc-outofstock\">PLACE THE TEXT HERE IN ENGLISH</span>";}
?>

#1

blecheimer - June 15, 2009 - 11:01

this does not work in views

 
 

Drupal is a registered trademark of Dries Buytaert.