Vue Setup
Quick setup guide for Vue applications with Stringer CLI
Stringer CLI integrates with Vue 3 projects using vue-i18n.
Quick Start
Stringer detects Vue and sets up everything automatically. Follow the prompts to convert your files and select target languages.
What Stringer Does
When you run stringer in a Vue project:
- Installs vue-i18n if not already installed
- Creates configuration in
src/i18n/index.ts - Updates main.ts to register the i18n plugin
- Converts your components — replaces text with
t('key')calls - Generates locale files with your translations
Code Transformation
Before
After
Generated Configuration
Stringer creates an i18n setup file:
What's Converted
Converted:
- Text in templates
- Strings in
<script setup>that are user-facing - Alert/confirm messages
- Button labels, headings, placeholders
Not converted:
- Code comments
- Console logs and debug messages
- Content inside
<style>tags - Strings in technical/config code
About Composables: Strings in /composables are skipped. Depending on context, injected t() calls there can cause build errors. Keep user-facing strings in components instead.
Basic Usage
Template Translation
Script Translation
Language Switching
Common Issues
Lists Not Updating on Language Change
If dropdown items or menus don't update when language changes, use computed:
Composition API Not Working
Ensure legacy: false in your i18n config:
Need Help?
Next Steps
- Commands — CLI reference
- Configuration — Project settings
- Pricing — Usage details