Skip to content
This repository was archived by the owner on Jan 1, 2020. It is now read-only.

Initial translation setup#85

Merged
EvanDotPro merged 24 commits into
zendframework:masterfrom
EvanDotPro:feature/i18n
Jul 6, 2012
Merged

Initial translation setup#85
EvanDotPro merged 24 commits into
zendframework:masterfrom
EvanDotPro:feature/i18n

Conversation

@EvanDotPro

Copy link
Copy Markdown
Member

This PR adds the following translations:

Thank you to everyone who has contributed translations so far! You're all awesome!

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice if we didn't have to do this to run the factory, but I don't have any immediate ideas.

Comment thread module/Application/language/de_DE.po Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be ZendSkeletonApplication

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed, thanks.

- s/ZendSkeletonModule/ZendSkeletonApplication in de_DE po file
- Switch back to en_US in module.config.php after accidental commit

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now the locale is being hardcoded to en_US. Perhaps we should add the ability to choose a language in the skeleton to illustrate how to change the locale?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea -- though, I'm not exactly sure what the best practice is on this, or how well routes support something like prepending a locale to the route stack... @DASPRiD may have more feedback on how he intended to handle this.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Evan,

that could be solved like that:

$localeList = array(
    'en_US',
    'en_UK',
    'fr_FR',
    'fr_CA',
    'de_DE',
    'tr_TR',
);
$browser = Locale::acceptFromHttp($_SERVER['HTTP_ACCEPT_LANGUAGE']);
$locale = Locale::lookup($localeList, $browser, 'en_US');

since Zend\Locale\Locale::getBrowser() has been removed, but this would cause a direct depandancy to php5-intl extension, which isn't activated/loaded on the half of isp's in Germany, i don't know what is givven in the us

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could check if class_exists first. Thoughts?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, why not. I hope that our ISP's will be forced to load intl by ZF2 release. ^^

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm, I think we might have to add something to the TranslatorServiceFactory to do this cleanly.

EvanDotPro added a commit to EvanDotPro/ZendSkeletonApplication that referenced this pull request Jul 6, 2012
@EvanDotPro EvanDotPro merged commit cdc1e98 into zendframework:master Jul 6, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.