It will work out of the box with any Vue app and you can change the styling as needed. I’ve built a non-opinionated component, which you can easily customize to your needs, that does this very thing (it’s the gif preview at the top of this article). Now that everything is set up and our translation process has been automated as much as possible, we’re pretty much ready to go out and localize apps we might build - of any size.įinally, we’ll want to give our users a way to easily change languages. Don’t worry, we’ll add more languages and generate translations for all our text in the next step. However, since we’ll be automating our translations later, I suggest you just hold down the ENTER key and make all the text the same language. That means all our translation.json files will be perfectly structured right out of the box! Awesome! It will also name each key based on the location of the string within your folder structure. This process will both add translation keys and also input our added translation text if we have more languages than one. The package will do its job quicker if we only have one language to start with Just follow the CLI’s instructions, but at this point it is best to start with a single language - your base language. In your terminal, go to your project folder and type the following: vue-translation-manager translate Now that vue-translation-manager is fully set up, we just need to tell it to go to work. This is the major time-saving part of this workflow. Like a New York gangster selling you something that seems too good to be true, I retort “fugeddaboudit!” Automation is here to do the heavy lifting for us! So strap in and get ready to have a fully-translated web app in no time flat. “It’s got, like, ten thousand strings! How will I ever add these to eight different locale files?” That sounds great, but the truth is that translating a web app is an extremely time consuming process. Launching in more regions means getting a wider audience to access your product in a way that’s more natural and inviting. However, if you don’t read the article you’ll miss all the real automation secrets! TLDR: For those wanting a quick start, or to simply copy my LanguageSwitcher component and i18n scripts into your own project, I’ve set up a Github repo that has everything laid out already. It isn’t merely an installation how-to, it’s a tailored workflow crafted through many app localization projects that will make your app translation difficulties a thing of the past.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |