Hard coded language string

Tata55

Avatar: Tata55

2018-09-23 12:09

In emails sent to a customer, there is an announcement

    // the following phrase must be present in the email's content. See the license - http://opensolution.org/licenses.html
    
$sMailContent .= "\n\n".( LANGUAGE == 'pl' ) ? 'Wysłane przez program Quick.Cart' 'Sent by the Quick.Cart program';


The string "Wysłane przez program Quick.Cart" should be IMHO language depending. Today it says almost nothing to a customer not knowing the Polish language. If written in respective LANGUAGE == '$config['default_lang']', the provided information would help to share the popularity of QC.
However, the comment to this code line excludes the possibility to modify the code. If this is not stricktly prohibited, how shal the code be changed?

» Quick.Cart v6.x

Tata at www.CMSimple.sk

treewood (OpenSolution)

Avatar: treewood

2018-09-24 08:42

It have 2 language forms. Polish and english. If you use other language then polish, then you wil see "Sent by the Quick.Cart program".

Guido

Avatar: Guido

2018-10-07 15:11

Hi,

Are you sure this string works?

Because my site and dashboard language is 'nl' but somehow I'm also getting the Polish string in my email.

When I echo this string in a frontend template file, also the Polish string is displayed.

Guido

Guido

Avatar: Guido

2018-10-07 15:22

But if you use the classic if statement, it does work:


if ( LANGUAGE == 'pl' ) {
  
$string 'WysÅ‚ane przez program Quick.Cart';
} else {
  
$string 'Sent by the Quick.Cart program';
}
$sMailContent .= "\n\n".$string;

Tata55

Avatar: Tata55

2018-10-17 09:33

I am just not sure if it's OK concerning the http://opensolution.org/licenses.html to change the code.

treewood (OpenSolution)

Avatar: treewood

2018-10-18 08:20

Change this line to:
$sMailContent .= "\n\n".( LANGUAGE == 'pl' ? 'Wysłane przez program Quick.Cart' : 'Sent by the Quick.Cart program' );

Works ok?

Back to top
about us | contact