Translations
The widget supports multiple languages and allows customization of any text. It includes ~195 translatable strings organized in 18 categories.
Available languages
es- Spanish (default)en- English
<script data-locale="en" ...></script>
NeuroonWidget.init({
locale: 'en', // or 'es'
});
Translation structure
The widget organizes translations into 18 categories:
interface Translations {
search: SearchTranslations; // Search field (18 keys)
results: ResultsTranslations; // Results list (19 keys)
product: ProductTranslations; // Product cards (11 keys)
filters: FiltersTranslations; // Filters panel (53 keys)
suggestions: SuggestionsTranslations; // Suggestions (10 keys)
modal: ModalTranslations; // Modals (2 keys)
voice: VoiceTranslations; // Voice search (9 keys)
image: ImageTranslations; // Image search (21 keys)
common: CommonTranslations; // Common texts (6 keys)
conversation: ConversationTranslations; // History (1 key)
empty: EmptyTranslations; // Empty states (12 keys)
topProducts: TopProductsTranslations; // Featured products (5 keys)
comparison: ComparisonTranslations; // Comparator (18 keys)
ai: AITranslations; // AI assistant (11 keys)
products: ProductsTranslations; // Products state (2 keys)
branding: BrandingTranslations; // Branding (1 key)
tooltip: TooltipTranslations; // Tooltips (3 keys)
errors: ErrorsTranslations; // Error messages (18 keys)
}
search - Search
Search field and chat overlay texts.
interface SearchTranslations {
placeholder: string; // "What are you looking for?"
clear: string; // "Clear"
loading: string; // "Loading..."
submit: string; // "Search"
voice: string; // "Voice search"
voiceReplace: string; // "Replace with voice"
image: string; // "Image search"
ghostTextHint: string; // "Tab to complete"
emptyStateTitle: string; // "What are you looking for?"
emptyStateDescription: string; // "Type or use voice/image"
voiceButton: string; // "Search by voice"
imageButton: string; // "Search by image"
chatPlaceholder: string; // "Type your search..."
openChat: string; // "Open chat"
close: string; // "Close"
inputAriaLabel: string; // "Search field"
}
results - Results
Results list texts.
interface ResultsTranslations {
empty: string; // "No results"
emptyHint: string; // "Try different terms"
error: string; // "Search error"
errorRetry: string; // "Retry"
showing: string; // "Showing"
of: string; // "of"
resultsFor: string; // "results for"
viewGrid: string; // "Grid view"
viewList: string; // "List view"
loadMore: string; // "Load more"
loading: string; // "Loading..."
products: string; // "products"
viewAll: string; // "View all"
endOfResults: string; // "End of results"
searchResults: string; // "Search results"
singular: string; // "result"
plural: string; // "results"
productFoundSingular: string; // "product found"
productFoundPlural: string; // "products found"
}
product - Product
Product card texts.
interface ProductTranslations {
outOfStock: string; // "Out of stock"
inStock: string; // "In stock"
onSale: string; // "On sale"
discount: string; // "{percent}% off"
viewInStore: string; // "View in store"
viewProduct: string; // "View product"
quickView: string; // "Quick view"
relevance: string; // "Relevance"
price: string; // "Price"
brand: string; // "Brand"
category: string; // "Category"
}
filters - Filters
Filter panel texts (the largest category with 53 keys).
interface FiltersTranslations {
// Basics
title: string; // "Filters"
refine: string; // "Refine"
price: string; // "Price"
priceMin: string; // "Min"
priceMax: string; // "Max"
category: string; // "Category"
brand: string; // "Brand"
inStock: string; // "In stock"
inStockOnly: string; // "In stock only"
onSale: string; // "On sale"
clear: string; // "Clear"
clearAll: string; // "Clear all"
apply: string; // "Apply"
showMore: string; // "Show more"
showLess: string; // "Show less"
active: string; // "Active"
applied: string; // "Applied"
remove: string; // "Remove"
other: string; // "Other"
more: string; // "More"
close: string; // "Close"
recommended: string; // "Recommended"
viewResults: string; // "View results"
// AI suggestions
aiSuggestions: string; // "AI suggestions"
confidence: string; // "Confidence"
productsMatch: string; // "products match"
// Detection sources
sourceQuery: string; // "From query"
sourceTrending: string; // "Trending"
sourceIntent: string; // "Intent"
// Price quick picks
priceBudget: string; // "Budget"
pricePopular: string; // "Popular"
pricePremium: string; // "Premium"
priceUpTo: string; // "Up to"
priceFrom: string; // "From"
priceMedian: string; // "Median"
priceDistribution: string; // "Distribution"
// Toast/undo
filterRemoved: string; // "Filter removed"
undo: string; // "Undo"
// Empty states
noFiltersApplied: string; // "No filters"
removeFiltersHint: string; // "Remove filters to see more"
// Additional UI
quickFilters: string; // "Quick filters"
filterBy: string; // "Filter by"
recommendedByAI: string; // "Recommended by AI"
tryWith: string; // "Try with"
viewMore: string; // "View more"
searchFacets: string; // "Search facets"
// Screen reader announcements
filtersAndSuggestions: string; // "Filters and suggestions"
filterAppliedSingular: string; // "filter applied"
filterAppliedPlural: string; // "filters applied"
suggestionAvailableSingular: string; // "suggestion available"
suggestionAvailablePlural: string; // "suggestions available"
loadingFilters: string; // "Loading filters"
// SmartHeader UI
singular: string; // "filter"
plural: string; // "filters"
hideOptions: string; // "Hide options"
showOptions: string; // "Show options"
appliedLabel: string; // "Applied"
suggestionsLabel: string; // "Suggestions"
pricePercentile: string; // "Price percentile"
// Sorting
sortBy: string; // "Sort by"
sort: {
relevance: string; // "Relevance"
price_asc: string; // "Price: low to high"
price_desc: string; // "Price: high to low"
rating: string; // "Best rated"
newest: string; // "Newest"
}
}
suggestions - Suggestions
Suggestions dropdown texts.
interface SuggestionsTranslations {
queries: string; // "Searches"
categories: string; // "Categories"
brands: string; // "Brands"
products: string; // "Products"
searchCount: string; // "searches"
productCount: string; // "products"
refine: string; // "Refine search"
alsoTry: string; // "Also try"
showMore: string; // "Show more"
title: string; // "Suggestions"
prefix: string; // "Search:"
}
modal - Modals
Generic modal texts.
interface ModalTranslations {
close: string; // "Close"
description: string; // "Modal description"
}
voice - Voice search
Voice interface texts.
interface VoiceTranslations {
noAudioDetected: string; // "No audio detected"
noVoiceDetected: string; // "No voice detected"
submit: string; // "Search"
audioProcessError: string; // "Audio processing error"
recordingError: string; // "Recording error"
microphonePermissionDenied: string; // "Microphone permission denied"
microphoneAccessFailed: string; // "Could not access microphone"
browserNotSupported: string; // "Browser not supported"
tapToSend: string; // "Tap to send"
}
image - Image search
Image interface texts.
interface ImageTranslations {
cancel: string; // "Cancel"
analyze: string; // "Analyze"
uploading: string; // "Uploading..."
analyzing: string; // "Analyzing..."
analyzingImage: string; // "Analyzing image"
identifyingProducts: string; // "Identifying products"
selectedImage: string; // "Selected image"
removeImage: string; // "Remove image"
search: string; // "Search"
unsupportedFormat: string; // "Unsupported format"
fileTooLarge: string; // "File too large"
dragHere: string; // "Drag here"
orClickSelect: string; // "or click to select"
uploadFile: string; // "Upload file"
useCamera: string; // "Use camera"
supportedFormats: string; // "Formats: JPG, PNG, WebP"
dropHere: string; // "Drop here"
aiGeneratedQuery: string; // "AI-generated query"
uploadHint: string; // "Upload a product image"
analysisError: string; // "Analysis error"
}
common - Common texts
Texts reused in multiple places.
interface CommonTranslations {
loading: string; // "Loading..."
retry: string; // "Retry"
noResults: string; // "No results"
searching: string; // "Searching..."
cancel: string; // "Cancel"
error: string; // "Error"
}
conversation - History
Conversation history texts.
interface ConversationTranslations {
history: string; // "History"
}
empty - Empty states
Texts for empty states (nested structure).
interface EmptyTranslations {
initial: {
title: string; // "What are you looking for?"
description: string; // "Type to start"
}
noResults: {
title: string; // "No results"
titleWithQuery: string; // "No results for '{query}'"
description: string; // "Try different terms"
suggestions: string; // "Suggestions:"
suggestion1: string; // "Use fewer words"
suggestion2: string; // "Check spelling"
suggestion3: string; // "Try synonyms"
}
error: {
title: string; // "Something went wrong"
description: string; // "Could not complete the search"
retry: string; // "Retry"
}
}
topProducts - Featured products
Top products section texts.
interface TopProductsTranslations {
title: string; // "Featured products"
zeroResultsTitle: string; // "You might like"
bestseller: string; // "Bestseller"
trending: string; // "Trending"
topRated: string; // "Top rated"
}
comparison - Comparator
Product comparator texts.
interface ComparisonTranslations {
addToComparison: string; // "Add to comparison"
removeFromComparison: string; // "Remove from comparison"
compare: string; // "Compare"
products: string; // "products"
product: string; // "product"
productComparison: string; // "Product comparison"
comparisonTitle: string; // "Comparison"
clearComparison: string; // "Clear comparison"
clearAll: string; // "Clear all"
closePanel: string; // "Close panel"
expand: string; // "Expand"
collapse: string; // "Collapse"
comparisonFull: string; // "Comparison full"
remove: string; // "Remove"
// AI analysis
bestChoice: string; // "Best choice"
aiAnalysis: string; // "AI analysis"
pros: string; // "Pros"
cons: string; // "Cons"
showAnalysis: string; // "Show analysis"
hideAnalysis: string; // "Hide analysis"
}
ai - AI assistant
AI assistant and guided filters texts.
interface AITranslations {
closeMessage: string; // "Close message"
thinking: string; // "Analyzing..."
analyzing: string; // "Analyzing your search..."
suggestion: string; // "Suggestion"
confidence: string; // "Confidence: {percent}%"
refinedQuery: string; // "Did you mean: {query}?"
guidedFilters: string; // "Suggested filters"
applyAll: string; // "Apply all"
ignore: string; // "Ignore"
yes: string; // "Yes"
no: string; // "No"
}
products - Products state
Viewed products state texts.
interface ProductsTranslations {
alreadySeen: string; // "Already seen"
scrollToPrevious: string; // "Back to previous"
}
branding - Branding
Branding texts.
interface BrandingTranslations {
poweredBy: string; // "Powered by Neuroon"
}
tooltip - Tooltips
Informational tooltip texts.
interface TooltipTranslations {
sourceQueryAnalysis: string; // "Query analysis"
sourceTrending: string; // "Based on trends"
sourceSmartSuggestion: string; // "Smart suggestion"
}
errors - Error messages
Error texts (18 keys for complete coverage).
interface ErrorsTranslations {
networkError: string; // "Network error"
networkTimeout: string; // "Request timeout"
apiError: string; // "Server error"
searchFailed: string; // "Search failed"
searchAborted: string; // "Search cancelled"
invalidQuery: string; // "Invalid search"
voiceNotSupported: string; // "Voice not supported"
voicePermissionDenied: string; // "Voice permission denied"
voiceNoSpeech: string; // "No speech detected"
voiceError: string; // "Voice error"
imageUploadFailed: string; // "Image upload failed"
imageTooLarge: string; // "Image too large"
imageInvalidFormat: string; // "Invalid image format"
configInvalid: string; // "Invalid configuration"
configMissing: string; // "Missing configuration"
componentInitFailed: string; // "Component init failed"
componentRenderFailed: string; // "Render failed"
unknown: string; // "Unknown error"
}
Customizing texts
Override any text via JavaScript. You only need to specify the keys you want to change:
NeuroonWidget.init({
container: '#neuroon-search',
token: 'YOUR_TOKEN',
locale: 'en',
translations: {
search: {
placeholder: 'Search our store...',
},
results: {
empty: 'We couldn\'t find what you\'re looking for',
emptyHint: 'Try different terms or fewer filters',
},
filters: {
title: 'Refine results',
clearAll: 'Reset filters',
},
product: {
inStock: 'Available for shipping',
outOfStock: 'Currently unavailable',
},
errors: {
networkError: 'No connection. Check your internet.',
},
},
});
You don't need to override all keys. The widget uses default values for any unspecified key.
Adding a new language
To add full support for a new language:
const frenchTranslations = {
search: {
placeholder: 'Que cherchez-vous ?',
clear: 'Effacer',
// ... rest of keys
},
results: {
empty: 'Aucun résultat',
// ... rest of keys
},
// ... rest of categories
};
NeuroonWidget.init({
locale: 'fr',
translations: frenchTranslations,
});