PHP Classes

Letter Composer Multilingual: Generate personal salutations to use in messages

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

Author

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: 41521 in United Kingdom
Week rank: 192 Up6 in United Kingdom Up
Innovation award
Innovation award
Nominee: 23x

Winner: 2x

Documentation

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

  Files folder image Files (4)  
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 README.md Doc. Documentation

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

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:86
This week:0
All time:10,018
This week:455Up