PHP Classes
elePHPant
Icontem

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    
Last Updated Ratings Unique User Downloads Download Rankings
2017-05-21 (6 months ago) RSS 2.0 feedNot yet rated by the usersTotal: 72 All time: 8,936 This week: 175Up
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
  Performance   Level  
Name: Peter Kahl <contact>
Classes: 32 packages by
Country: Hong Kong Hong Kong
Age: ???
All time rank: 6644 in Hong Kong Hong Kong
Week rank: 24 Up1 in Hong Kong Hong Kong Up
Innovation award
Innovation award
Nominee: 19x

Details

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  
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  /  src  
File Role Description
  Plain text file LetterComposer.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:72
This week:0
All time:8,936
This week:175Up