symfony / symfony

The Symfony PHP framework
https://symfony.com
MIT License
29.8k stars 9.47k forks source link

[Translation] Add support for the MessageFormatter class #6009

Closed hason closed 7 years ago

hason commented 12 years ago

Instead of reinventing wheel in #4797, #4884, #5547, we should use the MessageFormatter class. Read more:

sroddy commented 11 years ago

@guilhermeblanco what do you think about this? I still haven't looked at the class so deep, but I agree that using a common php ext/library would be better that writing the component from scratch.

guilhermeblanco commented 11 years ago

F*ck! It totally makes sense. It'd simplify the code a lot.

DavidBadura commented 10 years ago

+1 that would make it easier

Matthimatiker commented 10 years ago

@DavidBadura Have a look at https://github.com/webfactory/icu-translation-bundle. We developed that bundle specifically for message formatting. Might help.

guilhermeblanco commented 10 years ago

I have a yet to be finished patch laying around somewhere... will submit for 3.0. I also did the same work as webfactory's, but I deal with fallbacks too, so if it doesn't work with Intl, it tries the Symfony old style.

fkrauthan commented 7 years ago

Any news on progress for this?

Koc commented 7 years ago

@fkrauthan see linked PRs above

HeahDude commented 7 years ago

@fkrauthan Will soon be closed by https://github.com/symfony/symfony/pull/18314 :)

fkrauthan commented 7 years ago

@HeahDude I just skipped thru that article and it seems like the step into the right direction but it seems like that https://github.com/webfactory/icu-translation-bundle would still be superior as it allows you to mix multiple formattings (e.g. select for gender + count + number formatting for count - see https://github.com/webfactory/icu-translation-bundle/blob/master/Resources/doc/index.rst#nested-conditions). Or will that be possible with #18314 too?