database error after add an additional language

Hi



i get this error

database error after add an additional language



====================================================================



Database error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '‘AR’ as lang_code, description) SELECT attachment_id, ‘AR’ as lang_code, de' at line 1 (1064)
Invalid query: REPLACE INTO cscart_attachment_descriptions (
attachment_id, 'AR' as lang_code, description) SELECT attachment_id, 'AR' as lang_code, description` FROM cscart_attachment_descriptions WHERE lang_code = ‘EN’



--------------------------------------------------------------------------------



Backtrace: File: /var/www/vhosts/5cc5.com/httpdocs/core/fn.database.php

Line: 310

Function: db_error

File: /var/www/vhosts/5cc5.com/httpdocs/controllers/admin/languages.php

Line: 124

Function: db_query

File: /var/www/vhosts/5cc5.com/httpdocs/core/fn.control.php

Line: 560

Function: include

File: /var/www/vhosts/5cc5.com/httpdocs/core/fn.control.php

Line: 415

Function: fn_run_controller

File: /var/www/vhosts/5cc5.com/httpdocs/adminssa.php

Line: 27

Function: fn_dispatch



=============================================================

Can someone please tell me how I can fix this. Thanks.

Looks like a bug. Find the SQL statement in (probably) core/fn.control.php or controllers/admin/languages.php and change the SQL to something like:


REPLACE INTO cscart_attachment_descriptions (`attachment_id`, 'AR' as lang_code, `description`) SELECT `attachment_id`, 'AR' as`lang_code, `description` FROM cscart_attachment_descriptions WHERE lang_code = 'EN'


should become


REPLACE INTO cscart_attachment_descriptions (`attachment_id`, `lang_code`, `description`) SELECT `attachment_id`, 'AR' as lang_code, `description` FROM cscart_attachment_descriptions WHERE lang_code = 'EN'