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:
sebseb7
2025-07-18 12:36:39 +02:00
parent 67f0126343
commit aa82e8d1d2
3 changed files with 25 additions and 2 deletions

View File

@@ -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 {

View File

@@ -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 {