This demonstrates the new auto-loading localization feature - no manual translation imports needed!
✨ What's New:
Simply set language: 'fr' or language: 'es' in your table configuration.
French and Spanish translations are now automatically included!
// OLD WAY (still works, but not required for common languages):
import { frenchTranslations } from '../src/locales/fr.js';
const table = new Table('#table', {
data: data,
language: 'fr',
translations: { fr: frenchTranslations } // ❌ No longer needed!
});
// NEW WAY (automatic):
const table = new Table('#table', {
data: data,
language: 'fr' // ✅ That's it! French is auto-loaded
});
🔄 Test Language Switching:
Click the language buttons above to see the table interface change languages instantly.
Notice how pagination, search, and other UI elements are automatically translated!