VirtueMart Forum

VirtueMart 2 + 3 + 4 => Language/Translations => Topic started by: sdinizr on August 05, 2016, 16:26:03 PM

Title: Language Portuguese Brazil
Post by: sdinizr on August 05, 2016, 16:26:03 PM
When I set Portuguese(Brazil) as default language for the site the following error messages appear in the site:
(Joomla version 2.5.28 Virtuemart version 3.0.14)

( ! ) Notice: Undefined index: pt-BR in C:\wamp\www\lisergourmet\administrator\components\com_virtuemart\helpers\config.php on line 948
Call Stack
#   Time   Memory   Function   Location
1   0.0020   140528   {main}( )   ..\index.php:0
2   0.3190   3181672   JSite->dispatch( )   ..\index.php:42
3   0.3430   3397424   JComponentHelper::renderComponent( )   ..\application.php:194
4   0.3620   3503040   JComponentHelper::executeComponent( )   ..\helper.php:348
5   0.3640   3552840   require_once( 'C:\wamp\www\lisergourmet\components\com_virtuemart\virtuemart.php' )   ..\helper.php:380
6   0.3920   4436328   VmConfig::loadConfig( )   ..\virtuemart.php:24
7   0.4890   5213432   VmConfig::setdbLanguageTag( )   ..\config.php:883

( ! ) Notice: Trying to get property of non-object in C:\wamp\www\lisergourmet\administrator\components\com_virtuemart\helpers\config.php on line 948
Call Stack
#   Time   Memory   Function   Location
1   0.0020   140528   {main}( )   ..\index.php:0
2   0.3190   3181672   JSite->dispatch( )   ..\index.php:42
3   0.3430   3397424   JComponentHelper::renderComponent( )   ..\application.php:194
4   0.3620   3503040   JComponentHelper::executeComponent( )   ..\helper.php:348
5   0.3640   3552840   require_once( 'C:\wamp\www\lisergourmet\components\com_virtuemart\virtuemart.php' )   ..\helper.php:380
6   0.3920   4436328   VmConfig::loadConfig( )   ..\virtuemart.php:24
7   0.4890   5213432   VmConfig::setdbLanguageTag( )   ..\config.php:883

How can i solve this problem?
Thank you.
Title: Re: Language Portuguese Brazil
Post by: GJC Web Design on August 05, 2016, 16:49:41 PM
a bit odd as the code is

if (class_exists('JLanguageHelper') && (method_exists('JLanguageHelper', 'getLanguages'))) {
         $languages = JLanguageHelper::getLanguages('lang_code');
         $ltag = JFactory::getLanguage()->getTag();
         self::$vmlangSef = $languages[$ltag]->sef;
         self::$jLangCount = count($languages);
      }

so this  --  $ltag = JFactory::getLanguage()->getTag();

is returning nothing

have you configured correctly the whole language setup in Joomla as well as in VM?  incl. config under   /administrator/index.php?option=com_languages&view=languages
(content languages)