简体   繁体   English

Osclass类别翻译未显示前端

[英]Osclass Category Translation not showing front end

here my website i was installed osclass script.it need to be multilingual so, translated to local Sinhala (si_SI). 在我的网站上,我安装了osclass script.it,因此需要多语言,才能翻译成本地的僧伽罗语(si_SI)。 categories were also updated with both Sinhalese and English language. 类别也更新为僧伽罗语和英语。 but at the front end while switch into languages its categories were only shows on English only. 但是在切换到语言时,在前端,其类别仅显示在英语上。 was anyone had solution for showing categories also in other languages? 有没有人可以用其他语言显示类别?

  1. front end with Sinhala Language http://i60.tinypic.com/17cy9j.jpg "front end with Sinhala Language" 使用Sinhala语言的前端http://i60.tinypic.com/17cy9j.jpg “使用Sinhala语言的前端”

  2. front end with English Language http://i59.tinypic.com/314s1u1.jpg "front end with English Language" 使用英语的前端http://i59.tinypic.com/314s1u1.jpg “使用英语的前端”

Osclass bug. osclass错误。 They generate Bad SQL for the categories: 他们为以下类别生成错误的SQL:

SELECT *
FROM ((SELECT a.*,  b.*,  c.i_num_items,  FIELD(fk_c_locale_code,  'sv_SE') as locale_order
FROM (oc_t_category as a)
INNER  JOIN oc_t_category_description as b ON a.pk_i_id = b.fk_i_category_id
LEFT  JOIN oc_t_category_stats  as c  ON a.pk_i_id = c.fk_i_category_id
WHERE b.s_name != ''
AND a.b_enabled = 1
ORDER BY locale_order DESC) dummytable)
GROUP BY pk_i_id
ORDER BY i_position ASC

This is SQL example for Sweden. 这是瑞典的SQL示例。 The SQL itself orders rows by locale_order. SQL本身通过locale_order对行进行排序。 Which is 1 - sv_SE and 0 - en_US. 分别是1-sv_SE和0-en_US。 And simply tries to group by pk_i_id. 并简单地尝试按pk_i_id分组。 On some mysql configurations it works, but on some not. 在某些mysql配置中,它可以工作,但在某些情况下则不能。

As stated in MySQL reference manual ( https://dev.mysql.com/doc/refman/5.0/en/group-by-extensions.html ) values chosen by GROUP BY extension are indeterminate - it is not "guaranteed" that first row (top->down) with distinct value will be chosen in the final result. 如MySQL参考手册( https://dev.mysql.com/doc/refman/5.0/en/group-by-extensions.html )中所述,GROUP BY扩展名选择的值不确定-并非“保证”首先在最终结果中将选择具有不同值的行(自上而下)。

No solution provided in this post. 这篇文章中没有提供解决方案。

when you echo the categories in the select element it probably needs to be translation ready. 当您在select元素中回显类别时,可能需要准备翻译。 eg <?php _e('categoryName', 'translationName');?> 例如<?php _e('categoryName', 'translationName');?>

Translating and editing language files Osclass 翻译和编辑语言文件Osclass

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM