2

I have been making some translations in my php files, using php echo method and the following method:

In PHP file

$body = __('email - contact email', array(':username' =>$contact['username'], ':email' =>$contact ['email'], ':subject' =>$contact['subject'], ':message' =>$contact['message']));

In my translation file

'email - contact email' => 'username: :username
            <br/><br/>
            email: :email
            <br/><br/>
            subject: :subject
            message: :message
        ',

I am unsure how I would use either of these methods to translate the following (I just need to translate the Japanese part and enter in to my translation file, so it can be translated into whatever the customer wants:

$applLink[] = '<a href="/page/affiliate_detail/'.$app['id'].'">申込書'.$inc.'へ</a>';
Karina
  • 665
  • 6
  • 17
  • 35

1 Answers1

1

An array with the translations should work, make a utf-8 file:

$lang['japanese_chars'.'_language1'] = "the_translated_string_language1";
$lang['japanese_chars'.'_language2'] = "the_translated_string_language2";

So in your code you can use this:

$applLink[] = '<a href="/page/affiliate_detail/'.$app['id'].'">'.$lang['申込書_language1'].$inc.'へ</a>';
$applLink[] = '<a href="/page/affiliate_detail/'.$app['id'].'">'.$lang['申込書_language2'].$inc.'へ</a>';
Salvador P.
  • 1,469
  • 19
  • 16