[Xerte-dev] Re: Export Code

Julian Tenney Julian.Tenney at nottingham.ac.uk
Mon Apr 30 13:39:07 BST 2012


I just added this, which I fished out of an old commit I did when I originally added this support: what did I do wrong?

      /*
      * Language support
      */

      mkdir($dir_path . 'languages');
      chmod($dir_path . 'languages', 0777);
      array_push($delete_folder_array, $dir_path . 'languages');


      copy($xerte_toolkits_site->root_file_path . "languages/language-config.xml", $dir_path . "languages/language-config.xml");

      array_push($delete_file_array,  $dir_path . "languages/language-config.xml");


      copy($xerte_toolkits_site->root_file_path . "languages/engine_" . $_SESSION['default_language'] . ".xml", $dir_path . "languages/engine_" . $_SESSION['default_language'] . ".xml");

      array_push($delete_file_array,  $dir_path . "languages/engine_" . $_SESSION['default_language'] . ".xml");

From: xerte-dev-bounces at lists.nottingham.ac.uk [mailto:xerte-dev-bounces at lists.nottingham.ac.uk] On Behalf Of Ron Mitchell
Sent: 30 April 2012 13:37
To: 'For Xerte technical developers'
Subject: [Xerte-dev] Re: Export Code

Hi Julian
not sure if you've tried export since updating export.php but I uploaded to the test server and my local copies and all of them now generate corrupt zips? Tried Firefox as well as IE so it's not the old/intermittent IE problem.
HTH
Ron

From: xerte-dev-bounces at lists.nottingham.ac.uk [mailto:xerte-dev-bounces at lists.nottingham.ac.uk] On Behalf Of Julian Tenney
Sent: 30 April 2012 12:09
To: For Xerte technical developers
Subject: [Xerte-dev] Re: Export Code

Yes, with a dash. I looked it up somewhere, I thought that was the 'standard' way?

Why rename $SESSION['default_language']? Seems appropriate..?

From: xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk> [mailto:xerte-dev-bounces at lists.nottingham.ac.uk] On Behalf Of David Goodwin
Sent: 30 April 2012 12:08
To: For Xerte technical developers
Subject: [Xerte-dev] Re: Export Code


On 30 Apr 2012, at 12:00, Julian Tenney wrote:

$_SESSION['default_language']


It's identical to the directory name in /languages/. E.g. en-GB (I think).

I've only noticed en_GB (using an underscore) before, but you seem to use en-GB (using a dash '-')

David.



This would be the string 'en_GB', right?

From: xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk> [mailto:xerte-dev-bounces at lists.nottingham.ac.uk] On Behalf Of David Goodwin
Sent: 30 April 2012 10:43
To: For Xerte technical developers
Subject: [Xerte-dev] Re: Export Code


On 30 Apr 2012, at 09:02, Julian Tenney wrote:

Hi,

I re-added the export code I originally added in rev 60 back into export.php. How to know which language to export? Also, the way the the engine handles languages is to look in language-config.php. How to know what is indicated in there?


language-config.php ?


You could use $_SESSION['default_language'] - although perhaps this variable needs renaming.

thanks,
David.

Pale Purple Ltd.  (Company No: 5580814)
'Business Web Application Development and Training in PHP'

http://www.palepurple.co.uk
Office: 0845 0046746     Mobile: 07792380669

Follow us on Twitter: @PalePurpleLtd



This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham.

This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nottingham.ac.uk/pipermail/xerte-dev/attachments/20120430/b8ad7e8e/attachment.html>


More information about the Xerte-dev mailing list