• Welcome to PHPVIBE Forums. Please log in.

[ Video Sharing CMS v4 ] Translating Categories "Channels"

Started by AvuY,

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

AvuYTopic starter

Hello,,
i been searching the forums and the admin panel to see how we could translate the channels that we have created, but with no success,,
so please how its done ??
  •  

PHPVibe A.

Hi,
it doesn't have an feature to translate the channels to several languages, just the theme messages and elements.
If you want to achieve it, I can help you, but you would need to edit every language every time you add an new category.

AvuYTopic starter

  •  

PHPVibe A.

ok, open lib/functions.php and find:

   
$label = '<a href="'.channel_url($cat->id, $cat->name).'" title="'. stripslashes($cat->name).'"><img src="'.thumb_fix($cat->picture, true, 23, 23).'" class="cat-menu-img"/>'. stripslashes($cat->name).'</a>';


Replace it with:

      
$label = '<a href="'.channel_url($cat->id, $cat->name).'" title="'. _html($cat->name).'"><img src="'.thumb_fix($cat->picture, true, 23, 23).'" class="cat-menu-img"/>'. _html(_lang($cat->name)).'</a>';


Now you should have the channels name in every edit lang, AFTER you visit the site in every language and the tools -> clean cache , also use clean cache after editing the languages.

AvuYTopic starter

Thanks alot buddy, works perfectly now.. BUT i need your help with one more issue,,
when you click the language icon to change the website language all works great and the language is changed.. but once its changed you cant get back to the main "primary" language since clicking the language icon again shows the current "active" language .

Regards.
  •  

PHPVibe A.


AvuYTopic starter

  •  

PHPVibe A.

Let me take an wild guess and say the "English" language does not exist in the list of languages.
Click Create lang add English , en and then just click the "Create language".

PHPVibe by default has no language. Just the english "backbone", so you can create it with 2 texts and 1 click.

AvuYTopic starter

Thanks a lot buddy...

is it possible to hide the active language from the list ??
right now the active language is also shown in the list..

Regards.
  •  

PHPVibe A.

In tpl/main/tpl.globals.php you can change:

foreach($row as $l) {
$menu .= '<li><a href="'.canonical().'&clang='.$l->lang_code.'">'.$l->lang_name.'</a></li>';
if($l->lang_code == current_lang()) {$cr = $l->lang_name;}
}



to
foreach($row as $l) {
if($l->lang_code !== current_lang()) {
$menu .= '<li><a href="'.canonical().'&clang='.$l->lang_code.'">'.$l->lang_name.'</a></li>';
if($l->lang_code == current_lang()) {$cr = $l->lang_name;}
}

}


Didn't test, but it should work.

AvuYTopic starter

thanks a lot buddy ..
all is perfect now.. 
i appreciate your support.
  •  

PHPVibe A.


Similar topics (7)