I18Nv2: 4 feature requests + help offered
| From: | François Cardinaux | Date: | Sat, 30 Sep 2006 08:53:08 +0000 |
| Subject: | I18Nv2: 4 feature requests + help offered | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-44207@lists.php.net to get a copy of this message | ||
Dear Sirs,
I need some internationalization and localization features that are
not implemented in the I18Nv2 package, and I would be interested in
contributing to it. Here are the possible extension that would be very
helpful:
1) an I18Nv2_Locale::formatAddress() method, which would return a
correctly formatted postal address. It would take the following
parameters: $title, $first_name, $middle_name, $last_name,
$street_address1, $street_address2, $city, $state, $zip,
$zip_extension, $country.
Note about the $zip_extension parameter: in some countries and under
some circumstances, an extension is required on the zip and city line.
For example:
* The CEDEX in France: 75001 Paris CEDEX * A post box depot in Switzerland: 1211 Genève 32) an I18Nv2_Locale::formatFormOfAddress() method, which would return correct forms of address to be included at the beginning and at the end of letters. The parameters would be: the language, the type of letter (commercial or private) the type of recipient (an enterprise or a person), and optionally the recipient's title (Mr/Mrs/.../Dr), first name, middle name and last name. The method would return an array with two elements: the beginning and the end of the letter. Examples of return values: * In English: array('Dear Sirs, ', 'Yours faithfully.'), array('Dear Sir or Madam, ', 'Yours faithfully.'), array('Dear Mrs Brown, ', 'Yours faithfully.'), array('Dear Paul, ', 'Yours sincerely'), ... * In French: array('Madame, Monsieur, ', 'Veuillez agréer, Madame, Monsieur, mes salutations distinguées'), ... * In German: array('Sehr geehrte Damen und Herren, ', 'Mit freundlichen Grüssen. '), ... 3) an I18Nv2_Country::getAllStates() method, which would return the state list of the specified country. Note that some websites, like redcross.org, split the states in four categories: US, US Territories, US Military and Canada. It would be a good idea to do it in the I18Nv2 package too. 4) an I18Nv2_Language::getTitles() method, which would return a list of titles in the specified language. For example I18Nv2_Language::getTitles('fr') would return array('Monsieur', 'Madame', 'Mademoiselle', 'Docteur', ...). The method could take an optional 2nd parameter which would allow to disable some kinds of titles (for example if you don't want 'Docteur' in the list). Actually, I have already written a class that does more or less all of the above, but I think it would be better to integrate these functions to your package. I would be happy to your project, if you want. I am a Zend Certified engineer and I have a long practice of PHP programming: http://www.zend.com/store/education/certification/authenticate.php?ClientCandidateID=ZEND001852&RegistrationID=211033239 I speak English, French (mother language) and German. Yours faithfully, François Cardinaux rue des Eaux-Vives 3 1207 Geneva SWITZERLAND +41 22 735 52 71 (home) +41 79 403 47 45 (mobile)