translate days


  • Default avatar
    aleso    
     8 years ago
    0

    Hi
    Where can i tranlste the days, which are used insinde the experiation date?
    Becuase the days are not translated in german, they are still in englisch inside the mail an pdf and i doesn`t found them in ini file.

    br
  • Your avatar
    seyi    
     8 years ago
    0

    Hello,

    In www/administrator/components/com_awocoupon/helpers/estore/estoregiftcerthandler.php, around line 176 is this:

    <?php
            awolibrary
    ::loadLanguageAdmin();
    ?>


    Right before that, please add this

    <?php
            $purchaser_user 
    JFactory::getUser($purchaser_user_id);
            if(
    method_exists($purchaser_user,'getParam')) { 
                
    $language $purchaser_user->getParam('language');
                
    $jlang JFactory::getLanguage();
                
    $jlang->load(''JPATH_ROOT$languagetrue);
            }
    ?>


    I believe that will fix the issue
  • Default avatar
    aleso    
     8 years ago
    0

    Hi

    This solve not the problem. The line is 156 instead of line 176.

    br
  • Your avatar
    seyi    
     8 years ago
    0

    Hello,

    Then maybe i do not understand.

    Because I assume you are referring to the date not being translated? The above code will set the language to default language of the user. So when creating the date, it should be translated in that language.
  • Default avatar
    aleso    
     8 years ago
    0

    But this doesn`t work. The date is always in english and our default language is german.

    br
  • Your avatar
    seyi    
     8 years ago
    0

    hello,

    Not really sure. I did test this, so I know it works.

    The language of the user you are using to receive the gift certificate has the joomla language set to german?

    In the backend, under extensions->languages, you have it set to german as default?
  • Default avatar
    aleso    
     8 years ago
    0

    Hi
    Yes this is right. i set the default language to german and i also set the language of the user manually to german and the problem still occurs.

    br
  • Your avatar
    seyi    
     8 years ago
    0

    Hello,

    Specifically, which tag is not being translated?
  • Default avatar
    aleso    
     8 years ago
    0

    Hi yes.

    The day and the month are not translated.

    br
  • Your avatar
    seyi    
     8 years ago
    0

    Hello,

    This did not answer the question I posted. Can you tell me which tag you are referring to that is not being translated?

    Also there is a new version out, try updating, maybe it will help.
  • Default avatar
    aleso    
     8 years ago
    0

    i tryed the the new version and the problem still exist.
    The day Friday should be Freitag and the month October should be October.

    br
  • Your avatar
    seyi    
     8 years ago
    0

    Hello,

    Which tag is this?
  • Default avatar
    aleso    
     8 years ago
    0

    i don`t know what you want. Maybe i understand it wrong
  • Your avatar
    seyi    
     8 years ago
    0

    hello,

    Maybe it is best you send an image of where you are configuring that is causing problems.

    You can send to the email address on the contact us page.
  • Your avatar
    seyi    
     8 years ago
    0

    Ok, got it now. The {vouchers} tag, where {expiration} is used.

    Ok so to fix this
    in www/administrator/components/com_awocoupon/helpers/awolibrary.php, around line 246 is this:
    <?php
    $expiration_text 
    = !empty($row->expiration) ? str_replace('{expiration}',date(JText::_('DATE_FORMAT_LC1'),strtotime($row->expiration)),$profile['lang_voucher_exp_syntax']) : '';
    ?>


    Change it to this
    <?php
    $expiration_text 
    = !empty($row->expiration) ? str_replace('{expiration}',JHTML::_('date'$row->expiration),$profile['lang_voucher_exp_syntax']) : '';
    ?>


    That should fix it.
  • Default avatar
    aleso    
     8 years ago
    0

    It works. Thansk a lot