need to translate job catregories

6 years 2 months ago #2851 by hanan
im have a problem with translating job categories in a mutlilanguage website
i have every thing translated except for the categories
i tried to add to the " ar-AA.com_jsjobs.ini " file the following line for example
DESIGN="تصميم"
but still it didnt work ,, please help it's important
6 years 2 months ago #2855 by Ahmed
Please edit ../components/com_jsjobs/views/jobseeker/tmpl/jobcat.php

Find this line (line # 109)

<td width="<?php echo $colwidth; ?>%" align="left"><span id="themeanchor"><a class="anchor" href="/<?php echo $lnks; ?>" ><?php echo $category->cat_title; ?> (<?php echo $category->catinjobs; ?>)</a></span></td>


Replace with

<td width="<?php echo $colwidth; ?>%" align="left"><span id="themeanchor"><a class="anchor" href="/<?php echo $lnks; ?>" ><?php echo JText::_($category->cat_title); ?> (<?php echo $category->catinjobs; ?>)</a></span></td>

Then open translate file
CATEGORY NAME="Category Name"
DESIGN="تصميم"
ولازم يكون كابيتال زى ما انا كاتب

If you talk about Job category module, you need to edit ../modules/mod_jsjobscategories/mod_jsjobscategories.php

Add these lines

$lang = JFactory::getLanguage();
$lang->load('com_jsjobs');

After this

$dateformat = $result[2];
$contents = '';
/** sce */

Find this line (line # 67)

$contents .= '<td width="'.$colwidth.'"><span id="themeanchor"><a class="anchor" href="'.$lnks.'" >'.$category->cat_title;

Replace with

$contents .= '<td width="'.$colwidth.'"><span id="themeanchor"><a class="anchor" href="'.$lnks.'" >'.JText::_($category->cat_title);

For plugin you need to edit ../plugins/content//jsjobscategories/jsjobscategories.php

Add these lines

$lang = & JFactory :: getLanguage();
$lang->load('com_jsjobs');

After this line

protected function _load( $position, $style=-2 ) {
$document = &JFactory::getDocument();
$renderer = $document->loadRenderer('module');

Find this line (line #)

$contents .= '<td width="'.$colwidth.'"><span id="themeanchor"><a class="anchor" href="'.$lnks.'" >'.$category->cat_title;

Replace with

$contents .= '<td width="'.$colwidth.'"><span id="themeanchor"><a class="anchor" href="'.$lnks.'" >'.JText::_($category->cat_title);

بالتوفيق
The following user(s) said Thank You: aladdin alhamda
Time to create page: 0.189 seconds

Please publish modules in offcanvas position.