New project request: EDTF PHP library

New project request: EDTF PHP library

We are developing an EDTF implementation in PHP for the Luxembourg Ministry of Culture. One part of this library allows turning an EDTF string into a more readable natural language version. We already have preliminary support for multiple languages, and would like to use the message system of TranslateWiki to support more languages.

The library is at https://github.com/ProfessionalWiki/EDTF.

TranslateWiki can get write access on this repo.

Will get an open source license soon. I know this is a TranslateWiki requirement. We are waiting on confirmation from the Ministry.

You can see string construction at https://github.com/ProfessionalWiki/EDTF/blob/14b8a71e25444a25a5f0f3eda628be551fd4871e/src/Humanize/Languages/EnglishHumanizer.php. We'd replace this with a message (string key plus arguments) system like MediaWiki has if we get TranslateWiki support.

Jeroen De Dauw (talk)16:19, 9 February 2021

Do file a Phabricator task per the template in Translating:New_project when you're ready. Do note that inflectNumber (and maybe other code too) needs to be made language aware. You may want to look at CLDR data to see how much of that can be used to solve this.

Nike (talk)11:34, 11 February 2021

Thanks!

Any thoughts on how to avoid having `inflectNumber` in our code to begin with? Ideally we'd be able to use some PHP library that we just give the message key and some arguments, and that then takes care of it, including using the translation files from TranslateWiki in the repo.

Jeroen De Dauw (talk)17:39, 12 February 2021

Looks like it is now suppored by twn: https://translatewiki.net/wiki/Special:Translate/mwgithub-edtf. Cool and thanks!

[[kgh]] (talk)16:43, 19 March 2021