Configuration
Configure Stringer CLI settings for your project
How Configuration Works
Stringer CLI stores project-specific configuration in your home directory at ~/.stringer-cli.json. Each project is identified by its package.json name.
You don't need to manually edit any of this — it's handled automatically. This section is just for transparency about how we remember your project settings and what's stored on your computer.
Configuration Structure
When you run stringer, configuration is created and updated automatically:
Configuration Properties
| Property | Description | Example |
|---|---|---|
framework | Detected framework | "vue", "nuxt" |
baseLanguage | Source language code | "en-us", "fr-fr" |
targetLanguages | Target languages array | ["es-es", "fr-fr", "de-de"] |
outputDir | Where locale files are stored | "./i18n/locales" |
packageManager | Detected package manager | "npm", "pnpm" |
folders | Folders to process | ["."], ["src"] |
ignoredFiles | File patterns to ignore | ["**/*.test.*"] |
Framework Behavior
Vue Projects:
- Uses
vue-i18n - Function:
const { t } = useI18n() - Files:
src/**/*.{vue,js,ts}
Nuxt Projects:
- Uses
@nuxtjs/i18n - Function:
const { t } = useI18n() - Server:
const t = await useTranslation(event) - Files:
pages/**/*,components/**/*,server/**/*
Updating Configuration
Configuration happens automatically when you use Stringer:
Follow the prompts to update:
- Target languages
- Output directory
- Folders to process
- File patterns to ignore
Configuration Location
- Global Config:
~/.stringer-cli.json - Project Detection: Based on
package.jsonname - Per-Project: Each project maintains separate settings
Cache & Config Management
If you're experiencing issues with file detection or configuration, you can reset these from the Advanced menu:
- Clear File Cache — Force Stringer to rescan all files on the next run
- Clear Config File — Reset your local configuration to defaults
You can also clear the cache directly with:
Common Issues
Configuration Not Found
- Run
stringerto automatically create configuration - Ensure you're in a directory with
package.json
Wrong Framework Detected
- Re-run
stringerand manually select the correct framework
Lost Configuration
- Configuration is preserved when you re-run
stringer - Project settings are maintained across sessions
Reactive Data Tips
When using translated strings in lists or dropdowns, use computed to react to language changes:
Next Steps
- Commands — CLI command reference
- Frameworks — Framework-specific setup
- Languages — View all 47 supported languages
- Troubleshooting — Common issues and solutions