PHP Classes

Letter Composer Multilingual: Generate personal salutations to use in messages

Recommend this page to a friend!
  Info   View files Documentation   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 86 All time: 10,006 This week: 455Up
Version License PHP version Categories
letter-composer-mult 1.0Custom (specified...5Email, Localization, PHP 5, Text proc...


This class can generate personal salutations to use in messages.

It can takes the name and the gender of a person and it generates a salutation that can be inserted in mail messages and other types of messages that salute the user.

The class supports many languages like Arabic, Czech, Danish, German, English, Spanish, French, Hebrew, Italian, Japanese, Ducth, Portuguese, Russian, Chinese, etc..

Innovation Award
PHP Programming Innovation award nominee
June 2017
Number 10
When you need to salute people in messages, you should do it according to the person gender and language of the message.

This package can guess the salutation to use in messages based on the gender of the person in many different languages.

Manuel Lemos
Picture of Peter Kahl
  Performance   Level  
Name: Peter Kahl <contact>
Classes: 37 packages by
Country: United Kingdom
Age: ???
All time rank: 41721 in United Kingdom
Week rank: 91 Up4 in United Kingdom Up
Innovation award
Innovation award
Nominee: 23x

Winner: 2x



Provides methods useful for composing letters (mail).


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


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.'

  Files folder image Files  
File Role Description
Files folder imagesrc (1 file)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file Doc. Documentation

  Files folder image Files  /  src  
File Role Description
  Plain text file LetterComposer.php Class Class source

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:10,006
This week:455Up