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

Add BrowserHeaders class #85

Open
snytkine opened this issue May 6, 2012 · 1 comment
Open

Add BrowserHeaders class #85

snytkine opened this issue May 6, 2012 · 1 comment
Milestone

Comments

@snytkine
Copy link
Owner

snytkine commented May 6, 2012

Add class BrowserHeaders to parse Accept-Language and Accept-Encoding headers.
The return for these should be always an array of values ordered in the order they appear in headers
The value of "q=" should be used according the W3C standards.
When there is no q then just use the order of appearance, otherwise use value of "q"

Then we can use these values to set the Translation's object locale to the first match of supported language

For Charset we always serve pages in UTF-8 format but if utf-8 is not in the list of accepted charsets then we can recode into the user's prefered charset using iconv() from the output buffer but only if iconv extension is available.

For this to work we should not hard-code the utf-8 into headers like we do now in index.php

@snytkine
Copy link
Owner Author

This will be done in PR3 when Intl extension is used.

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

No branches or pull requests

1 participant