• Welcome to PHPVIBE Forums. Please log in.

[ Video Sharing CMS v4 ] Translating category names

Started by Rafa,

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

RafaTopic starter

I am interested in translating the category names and its description. Given that it cannot be translated through the default method, Any ideas on how I could do that?

Let's say...
In the case of the category list on the left sidebar, where the category names are brought in the loop, if I added " _lang("") ", around the category name, inside the loop. Would that give me translatable categories?

What are your thoughts on that?
  •  

PHPVibe A.


RafaTopic starter

  •  

RafaTopic starter

Hey Alexander, what about translating the category description. Where would I edit to achieve the same results?
  •  

PHPVibe A.

This is what you're looking for

<h1>'._html($channel->cat_name).'</h1>
'._html($channel->cat_desc).'


in tpl/main/channel.php

RafaTopic starter

What's the difference between:

. _html() .


and

._lang("").


When do you use one and when do you use the other?
  •  

RafaTopic starter

My apologies for the question above. It is clear to me what _lang("") does..
What I meant to ask was only about the

. _html() .


What is its purpose?
  •  

PHPVibe A.

Hi,
lib/functions.html.php has a few of this functions.

function _html($txt){
return stripslashes(html_entity_decode($txt, ENT_QUOTES));
}


It decodes html characters as explained here http://www.php.net//manual/en/function.html-entity-decode.php and strips the slashes from db escaping http://us2.php.net//manual/en/function.stripslashes.php

Similar topics (7)