Community Forums

Translation

how can i translate Documentation?


You must be signed-in to post.

AuthorSubject
 
Page: 1
ihnd

Avatar for ihnd
Subject: how can i translate Documentation?Quote this post in your reply
I want to translate documentation to farsi but i can't understand how can i do it.
i create this directories:
documentation/admin/fa
documentation/instructor/fa
documentation/general/fa
and i copy all said files to them.
and i edit line 103 on "vitals.inc.php" file in "...documentation\common" this like:
$available_languages = array('en' => 'en', 'fr'=>'fr', 'fa'=>'fa');
but i still can't view may translation in my language.
Posted: 2009-02-09 15:26:35
greg

Avatar for greg
Subject: Re: how can i translate Documentation?Quote this post in your reply
You should not need to edit vitals.inc.php. Just switch the language of ATutor to Farsi, and it should automatically get the Farsi translation on the handbook.

If you then switch ATutor back to English, it should get the English handbook.
Posted: 2009-02-09 16:09:26
ihnd

Avatar for ihnd
Subject: Re: how can i translate Documentation?Quote this post in your reply
Hi.
My work is in the local host in my pc.
i use xampp version 2.5

I first do this. But i can't see true result.
I edit vitals.inc.php after my confusion!!!

When i edit vitals.ins.php, after create "fa" directories in admin, general and instructor, but directories are empty, in documentation i see "This section has not yet been translated to your requested language. " in blue table.
But when i copy all related files to "fa" directories i see this error in documentation page:
Warning: require(../common/body_header.inc.php) [function.require]: failed to open stream: No such file or directory in D:\xampp\htdocs\at\documentation\instructor\fa\tests_surveys.php on line 1

Fatal error: require() [function.require]: Failed opening required '../common/body_header.inc.php' (include_path='.;D:\xampp\php\pear\') in D:\xampp\htdocs\at\documentation\instructor\fa\tests_surveys.php on line 1


I know that don't need to edit vitals.inc.php but i can't understand why my translated page in true directories don't show.
tank for your support.smile
Posted: 2009-02-10 14:02:48
greg

Avatar for greg
Subject: Re: how can i translate Documentation?Quote this post in your reply
Ah! I misunderstood. Yes, adding fa to the common/vitals.inc.php file was the right way. But that array should not be hard coded, as it was programmed by a previous programmer. We are going to replace that so it get generated directly from the languages available on the system.
Posted: 2009-02-11 10:56:12
cindy

Avatar for cindy
Subject: Re: how can i translate Documentation?Quote this post in your reply
Hi, thanks for translating the handbook and trying to understand ATutor scripts.

The way to fix the error you currently have is, go to each handbook file you copied into "fa" directory, modify the top line:

require('../common/body_header.inc.php');
to
require('../../common/body_header.inc.php');

same thing with the bottom line, change:

require('../common/body_footer.inc.php');
to
require('../../common/body_footer.inc.php');

Then, you should be able to view your translations.
Posted: 2009-02-11 10:57:20
ihnd

Avatar for ihnd
Subject: Re: how can i translate Documentation?Quote this post in your reply
Thanks a millionsmile
My problem solved.
Thank Greg.
Thank Cindy.
smile
Posted: 2009-02-12 15:19:39
es24tv

Avatar for es24tv
Subject: Re: how can i translate Documentation?Quote this post in your reply
No change lang in the frame_toc (all rest are good)
Posted: 2009-02-27 09:46:20
greg

Avatar for greg
Subject: Re: how can i translate Documentation?Quote this post in your reply
See the pages.inc.php files in each of the sub handbooks.
Posted: 2009-02-27 10:33:00
es24tv

Avatar for es24tv
Subject: Re: how can i translate Documentation?Quote this post in your reply
if the "pages.inc.php" had hands, she takes my eyes and put it inside the CPU of my PC wink wink wink

Thanks Greg, please excuse my stupidity!
Posted: 2009-02-27 10:46:27
 
Page: 1

You must be signed-in to post.

Related Articles