Closed imshadowz closed 8 years ago
Thanks for the pull request.
Can you please extend the unit tests to check the request header's language code? It should look similar to the one that I have written for the path parameter language code: https://github.com/codeva/hapi-i18n/blob/master/test/test.js#L131-L144
Also I think that the language code in the path parameter should override the language code in the request header since the path parameter is more explicit. This should also be tested to avoid unwanted side effects.
Thanks for response.
I will write a unit test soon.
@codeva I just write a unit test for this feature.
I have added a new pull request here: https://github.com/codeva/hapi-i18n/pull/6 I have renamed the plugin option to languageHeaderField and added some more tests. Can you please check if the changes are ok for you?
enable hapi-i18n to add custom language key in request’s headers