Refactor i18n handling for language cookie and headers
The commit encompasses the aspect of refactoring the i18n handling for language cookies and headers. It also includes the deletion of get-language-cookie file and its transformation into a function inside i18n.server file. Extra functionalities were added to the i18n.server like enhancing the i18n server instance creation to consider the 'accept-language' header and default to environment provided values when necessary. The changes were also adjusted accordingly on the packages/i18n/package.json where deletion of "./cookie" was realized.
This commit is contained in:
@@ -12,7 +12,6 @@
|
||||
"exports": {
|
||||
"./server": "./src/i18n.server.ts",
|
||||
"./client": "./src/i18n.client.ts",
|
||||
"./cookie": "./src/get-language-cookie.ts",
|
||||
"./provider": "./src/i18n-provider.tsx"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
Reference in New Issue
Block a user