elgreco

Topic: new translation file for use

hi!

jobberbase works with translation.ini file for the translations, but there are still a lot of hard coded files in it.

since i was bored to check  how to correct them i did a small change and make a small extra translation file.

1. in config.php after the last include add

Code:

require_once '_includes/language.php';

2. Create a a file languages.php in /_includes/ folder
Paste the following code

Code:

<?php



// File Name: language.php
// File Location : ./_includes/
// File author: Alen Stimec


// ---------------------------------------------------------------------------
// English Language File
// ---------------------------------------------------------------------------

// Page_home.php changes
$_lang['seo_title'] = 'My seo title';
$_lang['seo_desc']= 'My seo_desc';
$_lang['seo_keys']= 'My seo_keys';

//PhpMailer.php

$_lang[''] = '';

?>

4. go to page_home.php and others and edit the files ....

Code:

$smarty->assign('seo_title', $_lang['seo_title']);
$smarty->assign('seo_desc', $_lang['seo_desc']);
$smarty->assign('seo_keys', $_lang['seo_keys']);

5. Do the same steps in the rest of the files you wish to translate your jobberbase app smile

Please post any comment if you find any bug ..or a better implementation

regards
A

p.s. i changed the variable name to $_lang since $lang is already in use in class.Textile.php

Last edited by elgreco (2009-02-16 11:18:00)

evertsemeijn

Re: new translation file for use

Great tip. I've just change the hardcode language.

One downpoint and that is that all pages will have the same title, keywords and description, where I think that variable titles, keywords and descriptions are better. Limiting the numbers of keywords to max 20 is best and for my site it is not possible to combine all keywords into a list of max 20 words (sorry for my bad English. I can do better but don't feel that international today wink)

Member of Jobberbase Development Team - Templates/Usability :: Looking for installation and/or custom design? :: Beautiful Wordpress themes

elgreco

Re: new translation file for use

there is an error in the postman.php
if i state $subject = $_lang['apply_wish'];

the mail comes without the subject line

i need a bit more debuging smile