Update categoryList socket emissions to include language and translation request: Modified the socket.emit calls in SharedCarousel, Sitemap, and prerender.cjs to support language specification and translation requests. Added JTL language mappings in translate-i18n.js for improved localization.
This commit is contained in:
@@ -68,7 +68,7 @@ const SharedCarousel = () => {
|
||||
context && context.socket && context.socket.connected &&
|
||||
typeof window !== "undefined"
|
||||
) {
|
||||
context.socket.emit("categoryList", { categoryId: 209 }, (response) => {
|
||||
context.socket.emit("categoryList", { categoryId: 209, language: 'en', requestTranslation: true }, (response) => {
|
||||
if (response && response.categoryTree) {
|
||||
// Store in cache
|
||||
try {
|
||||
|
||||
@@ -106,7 +106,7 @@ const Sitemap = () => {
|
||||
|
||||
// Otherwise, fetch from socket if available (only in browser)
|
||||
if (context && context.socket && context.socket.connected && typeof window !== "undefined") {
|
||||
context.socket.emit('categoryList', { categoryId: 209 }, (response) => {
|
||||
context.socket.emit('categoryList', { categoryId: 209, language: 'en', requestTranslation: true }, (response) => {
|
||||
if (response && response.categoryTree) {
|
||||
// Store in cache
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user