You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For a webserver where new languages are added later on during the deployment phase, I would like to detect if the user languages are a perfect/default match (q=1) or a best fit (q<1). The idea is that only with a perfect match the user information in the database will be updated/initialized.
With for example nl,en-US;q=0.7,en;q=0.3 the user would get the en-US translation first, but when the site owner finishes the nl translation later on the user would be served with that (unless deliberately chosen otherwise). To offer this, I need to detect if the first item in the vector is a perfect match (or default) language of the user or just a best fit. The function signature would than include a boolean value which is true if the first item in the array is the perfect match / default value, and otherwise false. Like below:
For a webserver where new languages are added later on during the deployment phase, I would like to detect if the user languages are a perfect/default match (q=1) or a best fit (q<1). The idea is that only with a perfect match the user information in the database will be updated/initialized.
With for example
nl,en-US;q=0.7,en;q=0.3
the user would get theen-US
translation first, but when the site owner finishes thenl
translation later on the user would be served with that (unless deliberately chosen otherwise). To offer this, I need to detect if the first item in the vector is a perfect match (or default) language of the user or just a best fit. The function signature would than include a boolean value which is true if the first item in the array is the perfect match / default value, and otherwise false. Like below:Would you accept such a patch?
The text was updated successfully, but these errors were encountered: