Override CLocale class. #3077

Closed
SamMousa opened this Issue Nov 28, 2013 · 9 comments

Comments

Projects
None yet
5 participants
@SamMousa
Contributor

SamMousa commented Nov 28, 2013

CApplication uses CLocale by hardcoded name.
Wouldn't it be an improvement if it instead has an attribute localeClass with "CLocale" as the default value?

That way it could be overwritten in application configuration.

@samdark

This comment has been minimized.

Show comment Hide comment
@samdark

samdark Nov 28, 2013

Owner

What's your use case for custom CLocale?

Owner

samdark commented Nov 28, 2013

What's your use case for custom CLocale?

@SamMousa

This comment has been minimized.

Show comment Hide comment
@SamMousa

SamMousa Nov 28, 2013

Contributor

Currently it is to override behavior when getting information about languages.

In the future it might extend to loading data from more sources.

Maybe the better question is: why ever would you prefer using hard-coded class names?

Contributor

SamMousa commented Nov 28, 2013

Currently it is to override behavior when getting information about languages.

In the future it might extend to loading data from more sources.

Maybe the better question is: why ever would you prefer using hard-coded class names?

@samdark

This comment has been minimized.

Show comment Hide comment
@samdark

samdark Nov 28, 2013

Owner

Makes sense. Will set it to next release.

Owner

samdark commented Nov 28, 2013

Makes sense. Will set it to next release.

@SamMousa SamMousa closed this Dec 16, 2013

@cebe cebe reopened this Dec 16, 2013

@SamMousa

This comment has been minimized.

Show comment Hide comment
@SamMousa

SamMousa Dec 16, 2013

Contributor

Sorry, my bad; did not mean to close it!

Contributor

SamMousa commented Dec 16, 2013

Sorry, my bad; did not mean to close it!

pawzar pushed a commit to infoza/yii that referenced this issue Feb 5, 2014

pawzar pushed a commit to infoza/yii that referenced this issue Feb 5, 2014

@pawzar

This comment has been minimized.

Show comment Hide comment
@pawzar

pawzar Feb 5, 2014

Contributor

I made the change.

Contributor

pawzar commented Feb 5, 2014

I made the change.

@samdark

This comment has been minimized.

Show comment Hide comment
@samdark

samdark Feb 5, 2014

Owner

Can you send a pull request?

Owner

samdark commented Feb 5, 2014

Can you send a pull request?

@pawzar

This comment has been minimized.

Show comment Hide comment
@pawzar

pawzar Feb 5, 2014

Contributor

sent #3203

Contributor

pawzar commented Feb 5, 2014

sent #3203

samdark added a commit that referenced this issue Feb 5, 2014

@samdark samdark closed this Feb 5, 2014

@samdark samdark modified the milestones: 1.1.15, 1.1.16 Feb 5, 2014

twiesenthal pushed a commit to twiesenthal/yii that referenced this issue May 21, 2014

twiesenthal pushed a commit to twiesenthal/yii that referenced this issue May 21, 2014

@konapaz

This comment has been minimized.

Show comment Hide comment
@konapaz

konapaz Sep 27, 2014

Hi Sumdark

I have a siimilar issue.
I want to take all the currencies (currencySymbols).

There is a way to get it by country-region code (3-letter ISO 4217 code)
for example Yii::app()->locale->getCurrencySymbol('EUR');

but there is no method return all the currencies!

$_data is private and cannot get it directed. Also no method exist to returns $_data

Please I waiting for the version 1.1.16 :)

konapaz commented Sep 27, 2014

Hi Sumdark

I have a siimilar issue.
I want to take all the currencies (currencySymbols).

There is a way to get it by country-region code (3-letter ISO 4217 code)
for example Yii::app()->locale->getCurrencySymbol('EUR');

but there is no method return all the currencies!

$_data is private and cannot get it directed. Also no method exist to returns $_data

Please I waiting for the version 1.1.16 :)

@samdark

This comment has been minimized.

Show comment Hide comment
@samdark

samdark Sep 27, 2014

Owner

The code is in master. 1.1.16 won't include the fix while 1.1.17 will.

Owner

samdark commented Sep 27, 2014

The code is in master. 1.1.16 won't include the fix while 1.1.17 will.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment