1
chefry
problem coding in Classifieds module
  • 2011/8/9 13:02

  • chefry

  • Home away from home

  • Posts: 1005

  • Since: 2006/10/14


I'm doing a Russian translation of Classifieds and I'm having a coding problem

When you look in a category you see the "sort by:" block

the original code in Language/main.php says

" define($main_lang."_CURSORTEDBY","Listings currently sorted by: %s");"

Which matches to

" $xoopsTpl->assign('lang_cursortedby', sprintf(constant($main_lang."_CURSORTEDBY"), classifieds_convertorderbytrans($orderby)));"

in root/catview.php

Now....

In Language/main.php i added

" define($main_lang."_CURSORTEDBY2","Листингах сортируются по: %s");"

And in root/catview.php I added

"$xoopsTpl->assign('lang_cursortedby', sprintf(constant($main_lang."_CURSORTEDBY2"), classifieds_convertorderbytrans($orderby)));"

When it's displayed I wanted it to say:

Listings currently sorted by: (the info)
Листингах сортируются по: (the info)


one line after the other, displaying the same data (date, popularity, etc)

However, I can only get english OR russian to display, not both

The problem is in root/catview.php

Right now it's

" $xoopsTpl->assign('lang_cursortedby', sprintf(constant($main_lang."_CURSORTEDBY"), classifieds_convertorderbytrans($orderby)));

$xoopsTpl->assign('lang_cursortedby', sprintf(constant($main_lang."_CURSORTEDBY2"), classifieds_convertorderbytrans($orderby)));"


Can someone help me fix the coding so that both will appear?

TIA!

2
zyspec
Re: problem coding in Classifieds module
  • 2011/8/9 13:32

  • zyspec

  • Module Developer

  • Posts: 1095

  • Since: 2004/9/21


in this particular instance just change:
$xoopsTpl->assign('lang_cursortedby'sprintf(constant($main_lang."_CURSORTEDBY"), classifieds_convertorderbytrans($orderby)));

$xoopsTpl->assign('lang_cursortedby'sprintf(constant($main_lang."_CURSORTEDBY2"), classifieds_convertorderbytrans($orderby)));"


to:

$ccobt classifieds_convertorderbytrans($orderby);
$lang_csb sprintf(constant($main_lang."_CURSORTEDBY"), $ccobt) . "sprintf(constant ($main_lang."_CURSORTEDBY2"), $ccobt);

$xoopsTpl->assign('lang_cursortedby'$lang_csb);


This should do what you want... provided I didn't make a stupid syntax error somewhere.

Login

Who's Online

458 user(s) are online (115 user(s) are browsing Support Forums)


Members: 0


Guests: 458


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Sep 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits