Advertisement:

Author Topic: Wrong category language  (Read 1184 times)

Liath

  • issues
  • Hero Member
  • *
  • Posts: 1346
  • </html> the end is always near
Wrong category language
« on: March 10, 2017, 01:48:09 am »
Hey friends,


now i have to ask some ugly thing. The last days my categories are always shown in "bangla" language, no matter what language i set.


I've changed my code to check whether the language is submitted right and it does, my code looks ok and i dont know why it doesn't set right language for categories... All other is translated right, only categories doesn't.


here are my code to show the categories...
Code: [Select]
...

    while (osc_has_categories()) {
       
        $locale = osc_current_user_locale();
       
        $_id            = osc_category_id();
        $_slug          = osc_category_slug();
        $_url           = html_entity_decode(osc_search_category_url());
        $_name          = osc_category_field("s_name", $locale);
        //$_name        = osc_category_name($locale);
        $_total_items   = osc_category_total_items();
        $_icon          = classic_category_icon($_id);
       
        $return    .=  '<li class="menu__item icon">
                            <a class="menu__link '.$_slug.'" data-submenu="submenu-'.$_id.'" href="'.$_url.'">
                                <i class="fa fa-'.$_icon.' colors-'.$color.'"></i>
                                <span>'.$locale.' '.$_name.' ('.$_total_items.')</span>
                            </a>
                            <div class="clearfix"><>
                        </li>';
...


i've prepared the code to show me the used language code, like screenshot one... in my database are all correct, like screenshot two... maybe someone have another idea where i can take a look?




dev101

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2155
  • osclass.work
Re: Wrong category language
« Reply #1 on: March 10, 2017, 10:13:26 am »
You forgot to mention if some changes happened on your server. MariaDB? MySQL?
This is a known issue that happens on some servers, check this:

https://github.com/osclass/Osclass/pull/1794
https://github.com/osclass/Osclass/pull/2034

Regards

Liath

  • issues
  • Hero Member
  • *
  • Posts: 1346
  • </html> the end is always near
Re: Wrong category language
« Reply #2 on: March 10, 2017, 07:33:52 pm »
thank you dev101
i used this: http://forums.osclass.org/modern/categories-translation/msg116959/#msg116959 and it works now

thanks to teseo for the fix :)

yellow53

  • Full Member
  • ***
  • Posts: 142
Re: Wrong category language
« Reply #3 on: March 17, 2017, 12:19:18 am »
Hi Liath,

Sorry to disturb the main subject here...

I installed your voting plugin which is working great ! However, how can I display user vote average on their item sidebar page?

see attached please

many thanks for your help

Liath

  • issues
  • Hero Member
  • *
  • Posts: 1346
  • </html> the end is always near
Re: Wrong category language
« Reply #4 on: March 20, 2017, 02:19:10 am »
sorry, i cannot help here without disturbing the main topic, you can contact me and we can solve this

yellow53

  • Full Member
  • ***
  • Posts: 142
Re: Wrong category language
« Reply #5 on: March 21, 2017, 11:52:18 am »
no problem, what's your email please?

Kean

  • Newbie
  • *
  • Posts: 36
Re: Wrong category language
« Reply #6 on: August 07, 2017, 01:40:14 am »
Hi,

I didn't upgrade since 3.6.1 and had the Category translation problems. Now after upgrading (3.7.4), again there where the same category translation problems. Although, it is corrected by the teseo fix, I find it strange that the fix has not been applied to the core.

It is naturally possible to work this way also, i.e. to swap the category.php files.

Just wondering.

Kean