File: README.md

Recommend this page to a friend!
  Classes of Peter Kahl  >  Letter Composer Multilingual  >  README.md  >  Download  
File: README.md
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: Letter Composer Multilingual
Generate personal salutations to use in messages
Author: By
Last change: Update of README.md
Date: 2 years ago
Size: 1,471 bytes
 

Contents

Class file image Download

Letter-Composer-Multilingual

Provides methods useful for composing letters (mail).

Dependency

If you intend to use Czech language, you will also need to install library peterkahl/czech-name-declension.

Usage

use peterkahl\LetterComposer\LetterComposer;

$letterObj = new LetterComposer;
$letterObj->senderNamePlain = 'Customer Service Representative'. PHP_EOL .'Famous Company, Ltd.';
$letterObj->senderNameHtml  = 'Customer Service Representative<br>Famous Company, Ltd.';

# Example, Russian
$letterObj->lang            = 'ru';
$letterObj->recipientName   = '?????? ?????????';
$letterObj->recipientGender = 'f';
echo $letterObj->$letterObj->makeSalutation() . PHP_EOL . PHP_EOL . '??? ??? ????? ??????.' . PHP_EOL . PHP_EOL . $letterObj->makeValedictionPlain();
/*
'????????? ?????? ?????????,

??? ??? ????? ??????.

? ?????????,
Customer Service Representative
Famous Company, Ltd.'
*/

# Example, Czech
$letterObj->lang            = 'cs';
$letterObj->recipientName   = 'Václav ?tvrtek';
$letterObj->recipientGender = 'm';
echo $letterObj->$letterObj->makeSalutation() . PHP_EOL . PHP_EOL . 'Zde je Va?e nové heslo.' . PHP_EOL . PHP_EOL . $letterObj->makeValedictionPlain();
/*
'Milý Václave ?tvrtku,

Zde je Va?e nové heslo.

S pozdravem,
Customer Service Representative
Famous Company, Ltd.'
*/
For more information send a message to info at phpclasses dot org.