/**
* i18n.js — Sistema de tradução simples sem plugin
* PT/EN toggle com localStorage, sem reload
*/
(function(){
'use strict';
const TRANSLATIONS = {
pt: {
// === HEADER ===
'menu.home': 'Home',
'menu.work': 'Work',
'menu.about': 'Sobre',
'menu.contact': 'Contato',
'toggle.mode.light': 'Light',
'toggle.mode.dark': 'Dark',
// === HOME HERO ===
'home.kicker': 'Portfólio · 2026',
'home.lede': 'Designer e desenvolvedora baseada em Salvador.
Construo identidades e sistemas digitais
para marcas que pensam além do óbvio.',
'home.scroll': 'Trabalhos selecionados',
// === CASES (home + work) ===
'case.view': 'Ver case',
'case.live': 'Ver ao vivo',
'case.number.01': '01',
'case.number.02': '02',
'case.number.03': '03',
'case.number.04': '04',
'case.miaj.title': 'MIAJ',
'case.miaj.subtitle': 'Corretora de Seguros',
'case.miaj.tag': 'App web · Site · Identidade',
'case.bompracaramba.title': 'bompracaramba',
'case.bompracaramba.subtitle': 'Engenharia criativa de som',
'case.bompracaramba.tag': 'Sistema custom · React · Supabase',
'case.manuela.title': 'Manuela Amorim',
'case.manuela.subtitle': 'Psicologia do trabalho',
'case.manuela.tag': 'Identidade visual · Site',
'case.papapinhas.title': 'Papa Papinhas',
'case.papapinhas.subtitle': 'Alimentando com amor',
'case.papapinhas.tag': 'Site completo · Design · Dev',
// === HOME TEASER ABOUT ===
'teaser.about.kicker': 'Sobre',
'teaser.about.text': 'Mais de uma década em produção audiovisual,
hoje construindo web, branding e sistemas
para clientes no Brasil e fora.',
'teaser.about.cta': 'Conheça mais',
// === WORK PAGE ===
'work.eyebrow': 'Trabalhos',
'work.headline.1': 'Web design, vídeo',
'work.headline.2': 'e identidade.',
'work.sub': 'Cada projeto é uma marca construída do zero à operação. Em breve, também fotografia.',
'work.tab.apps': 'Apps & Sites',
'work.tab.identidades': 'Identidades Visuais',
'work.tab.videos': 'Vídeos',
'work.empty.text': 'Em breve.
Cases de identidade visual estão sendo preparados.',
'work.empty.hint': 'Marcas como Sentinela, Bastet Biosciences e a identidade pessoal Ingrid Aragão logo aparecem aqui.',
// === VIDEOS PAGE ===
'videos.eyebrow': 'Filmografia',
'videos.headline.1': 'Audiovisual,',
'videos.headline.2': 'da lente à tela.',
'videos.sub': 'Uma década em produção de cinema, documentário e comunicação. Quatro peças selecionadas que sintetizam esse caminho.',
'videos.cta.text': 'Tem um projeto audiovisual em mente?',
'videos.cta.btn': 'Vamos conversar',
// === SINGLE CASE ===
'case.single.live.cta': 'Quer explorar esse projeto em funcionamento?',
'case.single.back': '← Voltar para os cases',
'case.single.challenge': 'O desafio',
'case.single.solution': 'A solução',
'case.single.credits': 'Créditos',
'case.single.scroll': 'Role para descer',
// === FOOTER ===
'footer.tagline': 'Where code meets art',
'footer.location': 'Salvador, Bahia',
'footer.rights': 'Todos os direitos reservados.',
},
en: {
// === HEADER ===
'menu.home': 'Home',
'menu.work': 'Work',
'menu.about': 'About',
'menu.contact': 'Contact',
'toggle.mode.light': 'Light',
'toggle.mode.dark': 'Dark',
// === HOME HERO ===
'home.kicker': 'Portfolio · 2026',
'home.lede': 'Designer and developer based in Salvador, Brazil.
I build brand identities and digital systems
for brands that think beyond the obvious.',
'home.scroll': 'Selected work',
// === CASES ===
'case.view': 'View case',
'case.live': 'View live',
'case.number.01': '01',
'case.number.02': '02',
'case.number.03': '03',
'case.number.04': '04',
'case.miaj.title': 'MIAJ',
'case.miaj.subtitle': 'Insurance Brokerage',
'case.miaj.tag': 'Web app · Website · Identity',
'case.bompracaramba.title': 'bompracaramba',
'case.bompracaramba.subtitle': 'Creative sound engineering',
'case.bompracaramba.tag': 'Custom system · React · Supabase',
'case.manuela.title': 'Manuela Amorim',
'case.manuela.subtitle': 'Work psychology',
'case.manuela.tag': 'Visual identity · Website',
'case.papapinhas.title': 'Papa Papinhas',
'case.papapinhas.subtitle': 'Feeding with love',
'case.papapinhas.tag': 'Full website · Design · Dev',
// === HOME TEASER ABOUT ===
'teaser.about.kicker': 'About',
'teaser.about.text': 'Over a decade in audiovisual production,
now building web, branding and systems
for clients in Brazil and abroad.',
'teaser.about.cta': 'Learn more',
// === WORK PAGE ===
'work.eyebrow': 'Work',
'work.headline.1': 'Web design, video',
'work.headline.2': 'and identity.',
'work.sub': 'Each project is a brand built from scratch to operation. Photography coming soon.',
'work.tab.apps': 'Apps & Sites',
'work.tab.identidades': 'Visual Identities',
'work.tab.videos': 'Videos',
'work.empty.text': 'Coming soon.
Visual identity cases are being prepared.',
'work.empty.hint': 'Brands like Sentinela, Bastet Biosciences and the personal Ingrid Aragão identity will appear here soon.',
// === VIDEOS PAGE ===
'videos.eyebrow': 'Filmography',
'videos.headline.1': 'Audiovisual,',
'videos.headline.2': 'from lens to screen.',
'videos.sub': 'A decade in film, documentary and communication production. Four selected pieces that capture this journey.',
'videos.cta.text': 'Got an audiovisual project in mind?',
'videos.cta.btn': "Let's talk",
// === SINGLE CASE ===
'case.single.live.cta': 'Want to explore this project in action?',
'case.single.back': '← Back to cases',
'case.single.challenge': 'The challenge',
'case.single.solution': 'The solution',
'case.single.credits': 'Credits',
'case.single.scroll': 'Scroll down',
// === FOOTER ===
'footer.tagline': 'Where code meets art',
'footer.location': 'Salvador, Brazil',
'footer.rights': 'All rights reserved.',
}
};
const STORAGE_KEY = 'ia-lang';
const DEFAULT = 'pt';
function getLang(){
try { return localStorage.getItem(STORAGE_KEY) || DEFAULT; }
catch(e){ return DEFAULT; }
}
function setLang(lang){
try { localStorage.setItem(STORAGE_KEY, lang); } catch(e){}
document.documentElement.setAttribute('lang', lang);
}
function translate(lang){
const dict = TRANSLATIONS[lang] || TRANSLATIONS[DEFAULT];
// Traduz conteúdo
document.querySelectorAll('[data-i18n]').forEach(function(el){
const key = el.getAttribute('data-i18n');
if (dict[key] !== undefined) el.innerHTML = dict[key];
});
// Traduz atributos (alt, title, placeholder, aria-label)
document.querySelectorAll('[data-i18n-attr]').forEach(function(el){
// formato: data-i18n-attr="alt:key,title:key2"
const pairs = el.getAttribute('data-i18n-attr').split(',');
pairs.forEach(function(pair){
const [attr, key] = pair.split(':').map(s => s.trim());
if (dict[key] !== undefined) el.setAttribute(attr, dict[key].replace(/<[^>]+>/g,''));
});
});
// Atualiza o toggle visual
document.querySelectorAll('.ia-lang-toggle [data-lang]').forEach(function(btn){
btn.classList.toggle('is-active', btn.getAttribute('data-lang') === lang);
});
setLang(lang);
}
// Expõe globalmente
window.iaI18n = {
translate: translate,
getLang: getLang,
get: function(key){
const dict = TRANSLATIONS[getLang()] || TRANSLATIONS[DEFAULT];
return dict[key] || key;
}
};
// Auto-inicia no load
document.addEventListener('DOMContentLoaded', function(){
translate(getLang());
// Liga o toggle PT/EN
document.addEventListener('click', function(e){
const btn = e.target.closest('.ia-lang-toggle [data-lang]');
if (!btn) return;
e.preventDefault();
const newLang = btn.getAttribute('data-lang');
translate(newLang);
});
});
})();
https://ingridaragao.com/wp-sitemap-posts-post-1.xmlhttps://ingridaragao.com/wp-sitemap-posts-page-1.xmlhttps://ingridaragao.com/wp-sitemap-taxonomies-category-1.xmlhttps://ingridaragao.com/wp-sitemap-users-1.xml