Wang Qing

Wang Qing

Regular price
€38,00
Sale price
€38,00
Regular price
Sold out
Unit price
per 
Tax included

Author:Wang Qing
Dimensions:18.0 x 24.8 (cm)
Color photographs
111 pages
Binding:Hardcover

"The lives of people in western China have undergone unprecedented changes. A writer once said, 'We have gained much in this era, but we have also lost much.' While we are excited about what we have gained, it is very difficult to see what we have lost. I am not a writer, so I will use my camera to record the current situation of western nature, amidst the avalanche of development ." . —Wang Qing

    --> function translateAndSort() { var container = document.getElementById('tag-filters'); if (!container) return; // suponemos que dentro hay
  • Etiqueta
  • var items = container.querySelectorAll('li'); if (!items.length) return; var listForSort = []; items.forEach(function(li) { var link = li.querySelector('a'); if (!link) return; var original = (link.textContent || '').trim(); var key = original.toLowerCase(); var translated = map[key] || original; // si no está en el diccionario, dejar tal cual // traducir link.textContent = translated; listForSort.push({ el: li, text: translated.toLowerCase() }); }); if (!listForSort.length) return; // ordenar por el texto traducido listForSort.sort(function(a, b) { return a.text.localeCompare(b.text, 'en'); }); listForSort.forEach(function(obj) { container.querySelector('ul')?.appendChild(obj.el); }); } function init() { // ejecutar una vez al cargar translateAndSort(); // por si la ventana de filtro se construye después (AJAX / popup), // observar cambios en el DOM y volver a traducir var observer = new MutationObserver(function() { translateAndSort(); }); observer.observe(document.documentElement, { childList: true, subtree: true }); } if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', init); } else { init(); } })(); // Intenta acotar al contenedor típico de filtros; añade más selectores si hace falta var containers = document.querySelectorAll( '.collection-sidebar, .sidebar, .tag-list, .filters, .facets, [data-section-type*="collection"]' ); if (!containers.length) containers = [document.body]; // último recurso function translateNode(node) { // Solo elementos con texto (enlaces, labels de filtros, etc.) if (node.nodeType === Node.TEXT_NODE) { var original = node.nodeValue.trim(); if (!original) return; var key = original.toLowerCase(); if (map[key]) node.nodeValue = node.nodeValue.replace(original, map[key]); return; } // Evitar traducir inputs/values if (node.nodeType === Node.ELEMENT_NODE) { // No tocar campos de formulario ocultos ni scripts var tagName = node.tagName.toLowerCase(); if (tagName === 'script' || tagName === 'style' || tagName === 'noscript') return; // Traducir texto directo Array.from(node.childNodes).forEach(translateNode); // Si el elemento es un enlace o etiqueta con texto completo var text = (node.innerText || '').trim().toLowerCase(); if (map[text]) node.innerText = map[text]; } } function translateAll() { containers.forEach(function(c) { translateNode(c); }); } // Inicial translateAll(); // Observar cambios (por carga AJAX o filtros dinámicos) var obs = new MutationObserver(function(mutations) { mutations.forEach(function(m) { if (m.addedNodes && m.addedNodes.length) { m.addedNodes.forEach(function(n) { if (n.nodeType === 1) translateNode(n); }); } }); }); obs.observe(document.body, { childList: true, subtree: true }); })();