2026-07-05 06:41:32 +00:00
|
|
|
|
|
|
|
|
/* quiXzoom locale-data.js — Sprint 1 */
|
|
|
|
|
(function(){
|
|
|
|
|
window.QX_LOCALES = {
|
2026-07-12 12:41:35 +00:00
|
|
|
"sv-se": {
|
2026-07-05 06:41:32 +00:00
|
|
|
lang:"sv", currency:"EUR", symbol:"€", missionCurrency:"EUR",
|
2026-07-12 12:41:35 +00:00
|
|
|
flag:"🇸🇪", name:"Sweden", status:"Beta from Aug 1",
|
2026-07-05 06:41:32 +00:00
|
|
|
exampleMission:{ title:"Fasadinventering", addr:"Storgatan 14, Stockholm", reward:"24", time:"3 foton · ~12 min" },
|
|
|
|
|
mapCenter:[18.0686, 59.3293], exampleCity:"Stockholm",
|
|
|
|
|
taxNote:"Sweden: Grundavdrag ~17,500 SEK/year"
|
|
|
|
|
},
|
2026-07-12 12:41:35 +00:00
|
|
|
"nl-nl": {
|
|
|
|
|
lang:"nl", currency:"EUR", symbol:"€", missionCurrency:"EUR",
|
|
|
|
|
flag:"🇳🇱", name:"Netherlands", status:"Coming soon",
|
|
|
|
|
exampleMission:{ title:"Gevel Inspectie", addr:"Herengracht 52, Amsterdam", reward:"22", time:"3 fotos · ~12 min" },
|
|
|
|
|
mapCenter:[4.9041, 52.3676], exampleCity:"Amsterdam",
|
|
|
|
|
taxNote:"Netherlands: Zelfstandigenaftrek applies"
|
|
|
|
|
},
|
|
|
|
|
"de-de": {
|
2026-07-05 06:41:32 +00:00
|
|
|
lang:"de", currency:"EUR", symbol:"€", missionCurrency:"EUR",
|
2026-07-12 12:41:35 +00:00
|
|
|
flag:"🇩🇪", name:"Germany", status:"Coming soon",
|
|
|
|
|
exampleMission:{ title:"Fassadeninspektion", addr:"Maximilianstraße 12, München", reward:"24", time:"3 Fotos · ~12 min" },
|
2026-07-05 06:41:32 +00:00
|
|
|
mapCenter:[11.5820, 48.1351], exampleCity:"München",
|
|
|
|
|
taxNote:"Germany: Kleinunternehmer threshold €22,000/year"
|
|
|
|
|
},
|
2026-07-12 12:41:35 +00:00
|
|
|
"fr-fr": {
|
|
|
|
|
lang:"fr", currency:"EUR", symbol:"€", missionCurrency:"EUR",
|
|
|
|
|
flag:"🇫🇷", name:"France", status:"Coming soon",
|
|
|
|
|
exampleMission:{ title:"Inspection de Façade", addr:"12 Rue de Rivoli, Paris", reward:"22", time:"3 photos · ~12 min" },
|
|
|
|
|
mapCenter:[2.3522, 48.8566], exampleCity:"Paris",
|
|
|
|
|
taxNote:"France: Auto-entrepreneur regime for freelance income"
|
|
|
|
|
},
|
|
|
|
|
"it-it": {
|
|
|
|
|
lang:"it", currency:"EUR", symbol:"€", missionCurrency:"EUR",
|
|
|
|
|
flag:"🇮🇹", name:"Italy", status:"Coming soon",
|
|
|
|
|
exampleMission:{ title:"Ispezione Facciata", addr:"Via Roma 15, Milano", reward:"22", time:"3 foto · ~12 min" },
|
|
|
|
|
mapCenter:[9.1900, 45.4642], exampleCity:"Milano",
|
|
|
|
|
taxNote:"Italy: Regime forfettario for freelance income"
|
2026-07-05 06:41:32 +00:00
|
|
|
},
|
2026-07-12 12:41:35 +00:00
|
|
|
"es-es": {
|
|
|
|
|
lang:"es", currency:"EUR", symbol:"€", missionCurrency:"EUR",
|
|
|
|
|
flag:"🇪🇸", name:"Spain", status:"Coming soon",
|
|
|
|
|
exampleMission:{ title:"Inspección de Fachada", addr:"Calle Mayor 8, Madrid", reward:"22", time:"3 fotos · ~12 min" },
|
|
|
|
|
mapCenter:[-3.7038, 40.4168], exampleCity:"Madrid",
|
|
|
|
|
taxNote:"Spain: Autónomo regime for self-employed"
|
2026-07-05 06:41:32 +00:00
|
|
|
},
|
2026-07-12 12:41:35 +00:00
|
|
|
"th": {
|
|
|
|
|
lang:"th", currency:"THB", symbol:"฿", missionCurrency:"THB",
|
|
|
|
|
flag:"🇹🇭", name:"Thailand", status:"Coming soon",
|
2026-07-05 06:41:32 +00:00
|
|
|
exampleMission:{ title:"Shop Sign Survey", addr:"123 Sukhumvit Rd, Bangkok", reward:"320", time:"3 photos · ~12 min" },
|
|
|
|
|
mapCenter:[100.5018, 13.7563], exampleCity:"Bangkok",
|
|
|
|
|
taxNote:"Thailand: Income tax applies above ฿150,000/year"
|
|
|
|
|
},
|
2026-07-12 12:41:35 +00:00
|
|
|
"ja": {
|
|
|
|
|
lang:"ja", currency:"JPY", symbol:"¥", missionCurrency:"JPY",
|
|
|
|
|
flag:"🇯🇵", name:"Japan", status:"Coming soon",
|
|
|
|
|
exampleMission:{ title:"建物調査", addr:"東京都渋谷区道玄坂1-2-3", reward:"1200", time:"3枚の写真 · ~12分" },
|
|
|
|
|
mapCenter:[139.6917, 35.6895], exampleCity:"Tokyo",
|
|
|
|
|
taxNote:"Japan: Income tax applies for freelance work"
|
2026-07-05 06:41:32 +00:00
|
|
|
},
|
2026-07-12 12:41:35 +00:00
|
|
|
"ko": {
|
|
|
|
|
lang:"ko", currency:"KRW", symbol:"₩", missionCurrency:"KRW",
|
|
|
|
|
flag:"🇰🇷", name:"Korea", status:"Coming soon",
|
|
|
|
|
exampleMission:{ title:"걸물 조사", addr:"서울특별시 강남구 테헤란로 123", reward:"15000", time:"3장의 사진 · ~12분" },
|
|
|
|
|
mapCenter:[126.9780, 37.5665], exampleCity:"Seoul",
|
|
|
|
|
taxNote:"Korea: VAT applies for freelance income above ₩30M"
|
2026-07-05 06:41:32 +00:00
|
|
|
},
|
2026-07-12 12:41:35 +00:00
|
|
|
"zh-cn": {
|
|
|
|
|
lang:"zh", currency:"CNY", symbol:"¥", missionCurrency:"CNY",
|
|
|
|
|
flag:"🇨🇳", name:"China", status:"Coming soon",
|
|
|
|
|
exampleMission:{ title:"建筑调查", addr:"北京市朝阳区建国路88号", reward:"80", time:"3张照片 · ~12分钟" },
|
|
|
|
|
mapCenter:[116.4074, 39.9042], exampleCity:"Beijing",
|
|
|
|
|
taxNote:"China: IIT applies for freelance income"
|
2026-07-05 06:41:32 +00:00
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/* Detect market from cookie > URL path > GeoIP hint (meta tag) > default EN */
|
|
|
|
|
function getMarket(){
|
2026-07-12 12:41:35 +00:00
|
|
|
var m = document.cookie.match(/(?:^|;)\s*qx_market=([a-z]{2}-[a-z]{2}|[a-z]{2})/);
|
|
|
|
|
if(m) return m[1].toLowerCase();
|
|
|
|
|
var p = location.pathname.match(/\/([a-z]{2}-[a-z]{2}|[a-z]{2})\//i);
|
|
|
|
|
if(p) return p[1].toLowerCase();
|
2026-07-05 06:41:32 +00:00
|
|
|
var meta = document.querySelector('meta[name="qx-market"]')
|
2026-07-12 12:41:35 +00:00
|
|
|
if(meta) return meta.content.toLowerCase();
|
|
|
|
|
return 'sv-se'; /* launch market default — update to null after global launch */
|
2026-07-05 06:41:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function setMarket(code){
|
|
|
|
|
document.cookie = 'qx_market='+code+';path=/;max-age=31536000';
|
|
|
|
|
applyMarket(code);
|
|
|
|
|
/* re-fire market change event for any listeners */
|
|
|
|
|
document.dispatchEvent(new CustomEvent('qx:market', {detail:{market:code}}));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function applyMarket(code){
|
2026-07-12 12:41:35 +00:00
|
|
|
var d = window.QX_LOCALES[code] || window.QX_LOCALES['sv-se'];
|
2026-07-05 06:41:32 +00:00
|
|
|
var m = d.exampleMission;
|
|
|
|
|
|
|
|
|
|
/* Floating card in hero */
|
|
|
|
|
var t = document.querySelector('.ps-card-title');
|
|
|
|
|
var a = document.querySelector('.ps-card-addr');
|
|
|
|
|
var r = document.querySelector('.ps-card-reward');
|
|
|
|
|
var mt = document.querySelector('.ps-card-meta');
|
|
|
|
|
if(t) t.textContent = m.title;
|
|
|
|
|
if(a) a.textContent = m.addr;
|
|
|
|
|
if(r) r.textContent = m.reward+' '+d.symbol;
|
|
|
|
|
if(mt) mt.textContent = m.time;
|
|
|
|
|
|
|
|
|
|
/* Market selector button label */
|
|
|
|
|
var btn = document.querySelector('.market-selector-current');
|
|
|
|
|
if(btn) btn.textContent = code;
|
|
|
|
|
|
|
|
|
|
/* Store for use by other scripts */
|
|
|
|
|
window.QX_CURRENT_MARKET = code;
|
|
|
|
|
window.QX_CURRENT_LOCALE = d;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Expose API */
|
|
|
|
|
window.QX_setMarket = setMarket;
|
|
|
|
|
window.QX_getMarket = getMarket;
|
|
|
|
|
|
|
|
|
|
/* Auto-apply on DOM ready */
|
|
|
|
|
if(document.readyState === 'loading'){
|
|
|
|
|
document.addEventListener('DOMContentLoaded', function(){ applyMarket(getMarket()); });
|
|
|
|
|
} else {
|
|
|
|
|
applyMarket(getMarket());
|
|
|
|
|
}
|
|
|
|
|
}());
|