User Tools

Site Tools


urapidflow:i18n

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
urapidflow:i18n [2010/04/13 08:04]
unirgy
urapidflow:i18n [2011/07/06 19:18] (current)
unirgy
Line 1: Line 1:
 +====== uRapidFlow i18n ======
  
 +If you're working in multilanguage environment,​ and running uRapidFlow scripts from cron or command line interface, Magento might not set the correct default language before importing or exporting your profiles, and as result the files will have troubles to be imported/​exported.
 +
 +Add these few lines to make sure your uRapidFlow profile runs with the correct language:
 +
 +<file php urapidflow.php>​
 +<?php
 +
 +// initialize Magento environment
 +include_once '​app/​Mage.php';​
 +Mage::​app('​admin'​)->​setCurrentStore(0);​
 +
 +// initialize your language
 +Mage::​app()->​getLocale()->​setLocale('​nl_NL'​);​
 +Mage::​app()->​getTranslator()->​init('​global',​ true);
 +Mage::​app()->​getTranslator()->​init('​adminhtml',​ true);
 +
 +$helper = Mage::​helper('​urapidflow'​);​
 + 
 +// run profile using name:
 +$helper->​run("​Import Products - nl_NL profile"​);​
 +</​file>​
urapidflow/i18n.txt · Last modified: 2011/07/06 19:18 by unirgy