-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Additional Salutations #42
Comments
Definitely, and it doesn't appear that the code supports an easy way to add more salutations without creating a subclass. |
@jamessampford Would you like to create a pull request? |
@joeynovak How would you imagine the ability to add more/different salutations implemented? |
Sorry for the delay in getting back to you. A simple way would be to use a static array instead of a constant for the list, and just add a static method to add to the list. (I know a lot of developers hate anything static, but I find that unless you are running in an environment where multiple requests share the static scope (.Net, Java) it works great and doesn't produce bugs). |
It is the same for suffixes. They are very domain specific - a healthcare app might need to have RN , LPN, LSW, etc... $parser = new TheIconic\NameParser\Parser([
'suffixes' => ['lpn' => 'LPN', 'lsw' => 'LSW', 'rn' => 'RN'],
'salutations' => [ 'honourable' => 'Honourable']
]); Oh never mind. Looking through the code and rtfm I see that's exactly how setting languages works. You might consider change the name from Language to Nomenclature. Just because we tend to thing of using only one Language at a time, so if I am already using English "Language" it seems odd to create a new "Language" to handle Healthcare names. |
Thanks for the feedback @jamessampford @joeynovak and @HaroldPutman . |
There are quite a few extra salutations that could be added (such as Lord, Lady, Dame)
Long list:
https://en.wikipedia.org/wiki/English_honorifics
The text was updated successfully, but these errors were encountered: