Skip to content
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

Localization #4

Open
voltan opened this issue Feb 1, 2013 · 0 comments
Open

Localization #4

voltan opened this issue Feb 1, 2013 · 0 comments
Labels

Comments

@voltan
Copy link
Collaborator

voltan commented Feb 1, 2013

ZF2 I18n have some good options and standard for Localization, View Localization is very important and I18n Helper have some good options like CurrencyFormat, DateFormat, NumberFormat and We need plane for useage

All of them get some methods , but manage methods for each language is important, It possible to have config file or options for each language? like

<?php 

return array(
    'locale' => 'en_US',
    'dateType' => IntlDateFormatter::MEDIUM,
    'timeType' => IntlDateFormatter::MEDIUM,
    'formatStyle' => NumberFormatter::DECIMA,
    'formatType'  => NumberFormatter::TYPE_DEFAULT,
    'currencyCode' => '',
    'showDecimals' => '',
);

?>

And load / use this parameters in templates. for example add $this->numberFormat(); for all numbers or $this->dateFormat(); for all dates

date Localization is too important, for example in persian language we have local date and other langaues is lake this. for example :

http://en.wikipedia.org/wiki/Iranian_calendar
http://en.wikipedia.org/wiki/Jalali_calendar

http://en.wikipedia.org/wiki/Gregorian_calendar
http://en.wikipedia.org/wiki/Chinese_calendar
http://en.wikipedia.org/wiki/Hebrew_calendar
http://en.wikipedia.org/wiki/Islamic_calendar

For Persian calendar we have this php function : https://github.com/vahid-sohrabloo/Pdate

Other important think is local image / logo ( by theme or language ) like your codes in X2 newbb module

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant