"Tags" in Multi Language

edited November 2014 in Modules
Hi,

How can I make the "Tags" support multi language? I've tried add a "language" in the "Tags" Database but it show error.

Many thanks.

Comments

  • edited 9:04AM
    To clarify, you added a "language" field to the fuel_tags table? What error did you see?
  • edited 9:04AM
    @admin,

    I've added a "language" field to fuel_tags by using:
    ALTER TABLE `fuel_tags` ADD `languague` VARCHAR( 30 ) NOT NULL DEFAULT 'en' AFTER `precedence`

    After that, I click "Tags" it show me:
    A Database Error Occurred Error Number: 1052 Column 'language' in where clause is ambiguous SELECT DISTINCT fuel_tags.language, fuel_tags.language FROM (`fuel_tags`) LEFT JOIN `fuel_categories` ON `fuel_categories`.`id` = `fuel_tags`.`category_id` WHERE `language` != '' ORDER BY `fuel_tags`.`language` asc Filename: /home/testing.com/public_html/fuel/modules/fuel/core/MY_Model.php Line Number: 1124

    I also added the "language" field in fuel_categories but it work fine.

    Thanks a lot.
  • edited 9:04AM
    What if you change line 735 of the base_module_model to the following:
    $where[$this->table_name.'.'.$field.' !='] = '';
  • edited 9:04AM
    @admin

    After change, I can go "Tags" and it show the "Language" selection. But when I click "Create", it show another error:

    A Database Error Occurred Error Number: 1305 FUNCTION fuel_tags.CONCAT does not exist SELECT fuel_tags.id, fuel_tags.CONCAT(name, " - ", language) AS val_field FROM (`fuel_tags`) LEFT JOIN `fuel_categories` ON `fuel_categories`.`id` = `fuel_tags`.`category_id` ORDER BY `val_field` ASC Filename: /home/testing.com/public_html/fuel/modules/fuel/core/MY_Model.php Line Number: 1124
  • edited 9:04AM
  • edited 9:04AM
    Thanks, let me try and get back to you.
  • edited 9:04AM
    @admin,

    After I updated the code and click the "Tags", it show the error as below:

    A Database Error Occurred Error Number: 1054 Unknown column 'fuel_tags.fuel_tags.language' in 'where clause' SELECT DISTINCT fuel_tags.language, fuel_tags.language FROM (`fuel_tags`) LEFT JOIN `fuel_categories` ON `fuel_categories`.`id` = `fuel_tags`.`category_id` WHERE `fuel_tags`.`language` != '' AND `fuel_tags`.`fuel_tags`.`language` != '' ORDER BY `fuel_tags`.`language` asc Filename: /home/testing.com/public_html/fuel/modules/fuel/core/MY_Model.php Line Number: 1124
  • edited 9:04AM
    Are you sure you updated it correctly? I just downloaded a fresh version of FUEL and tried it and don't see that error.
  • edited 9:04AM
    It works now, thanks.

    I download a fresh version and overwrite the original one.
Sign In or Register to comment.