Formatted decimal numbers in language translation strings - Joomla! Forum - community, help and support
hi all,
i looked @ documentation formatted fields in language translation strings. describes how use formatted fields in translations , gives example of currency value:
now, expected output formatting of currency value?
in english, expect get:
in metric locales, however, such nl_nl or fr_fr, expect:
(note comma!) however, not work.
is there accepted way in joomla?
i understand sprintf function in php locale-aware, appreciate joomla not call setlocale, change locale users of site, not desireable multi-language site.
any ideas how without trickery? (i'm trying avoid pattern: if dutch or french or ... or ... replace "." ",". think adding language string translation files represents decimal character may not ideal.)
best regards, sander.
i looked @ documentation formatted fields in language translation strings. describes how use formatted fields in translations , gives example of currency value:
code: select all
donations have been received=donations of %.2f gbp have been received
$donations=12.45;
jtext::sprintf( 'donations have been received', $donations )now, expected output formatting of currency value?
code: select all
%.2f gbpin english, expect get:
code: select all
12.45 gbpin metric locales, however, such nl_nl or fr_fr, expect:
code: select all
12,45 gbp(note comma!) however, not work.
is there accepted way in joomla?
i understand sprintf function in php locale-aware, appreciate joomla not call setlocale, change locale users of site, not desireable multi-language site.
any ideas how without trickery? (i'm trying avoid pattern: if dutch or french or ... or ... replace "." ",". think adding language string translation files represents decimal character may not ideal.)
best regards, sander.
after 560 views no 1 answer. can't imagine i'm first 1 trying localize fractional numbers. perhaps i'm misphrasing question... feel free ask me more details, i'm happy elaborate 
Comments
Post a Comment