Skip to content Skip to sidebar

This topic contains 0 reply, has 1 voice.

Last updated by edwinc-12 2 months, 4 weeks ago.

Assisted by: Waqas Bin Hasan.

Author Posts
April 22, 2025 at 10:49 am #16954589

edwinc-12

Background of the issue:
I am trying to ensure that when I hover over 'all' and a category, the subcategories display in English. The issue can be seen on this page: hidden link

Symptoms:
When I hover over 'all' and a category, the subcategories still show in Arabic instead of English.

Questions:
Why are the subcategories still showing in Arabic when they should be in English?
How can I fix the language display issue for subcategories on hover?
async function fetchSubcategories(categoryId, signal) {
if (subcategoriesCache[categoryId]) {
return subcategoriesCache[categoryId];
}
try {
const response = await fetch(`hidden link{categoryId}&per_page=20&consumer_key=...&consumer_secret=...`, { signal });

if (!response.ok) throw new Error('Network response was not ok');
const data = await response.json();
// console.log('Subcategories Data for ID', categoryId, ':', data); // Log the actual data

subcategoriesCache[categoryId] = data;
return data;
} catch (error) {
if (error.name === 'AbortError') {
console.log('Fetch aborted');
} else {
console.error('Error fetching subcategories:', error);
}
return [];
}
}

The topic ‘[Closed] subcategories is not showing as should be’ is closed to new replies.