Home

Awesome

<h1>@google-translate-select</h1>

This project inherits from v-google-translate. The previous v-google-translate package move to branch backup/master, if you want to check it, click here.

<!-- [![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/i7eo/google-translate-select/Release/master?label=build%20%26%20release)](https://github.com/i7eo/google-translate-select/actions/workflows/release.yml/badge.svg) -->

GitHub Workflow Status (branch) All Contributors

@google-translate-select is an open-source project to invoke google translate jssdk to translate your dispaly content, we support vue2/vue3/react as follows:

GitHub package.json version (subfolder of monorepo) GitHub package.json version (subfolder of monorepo) GitHub package.json version (subfolder of monorepo)

Table of Contents

Refactor

I rewrote this project using pnpm + changeset + typescript + vite + tsup, use monorepo to manage project. The package name is @google-translate-select.

I refactor previous v-google-translate package using typescript and renamed it @google-translate-select/vue2, if you want to check it, click here.

Origin

This package enables localization of web apps made with vue by use of google translate.As your website and app grows, you may find a need to expand to other markets outside your home country.

If your target market lives across the sea and speaks a different language, you may not have any choice but to localize.

For more details on what localization is and the potential benefits, checkout this article.

Usage

Support Languages

see GOOGLE_TRANSLATE_SELECT_LANGUAGES in https://github.com/i7eo/google-translate-select/blob/master/packages/constants/src/web/languages.ts

Props

vue props see: https://github.com/i7eo/google-translate-select/blob/master/packages/vue3/src/types/props.ts

react props see: https://github.com/i7eo/google-translate-select/blob/master/packages/react/src/types/props.ts

Tips

Inspire

This package was heavily inspired by vue-google-translate.

Development

For local development, in the root of the repo run pnpm i to install all dependencies and then pnpm build to build all packages. Now follow the instructions of the specific package youโ€™re working on.

In case you are having problems to install the dependencies, try using NVM to get the same node version we use by running nvm use in the root of the repo, and check pnpm version.

Vitepress for @google-translate-select

We use vitepress with our library to develop document. You can start it from the root of the repo, just run pnpm dev:docs

Playground for @google-translate-select

We use vite with our library to test it. You can start it from the root of the repo, just run pnpm dev:react or pnpm dev:vue2 or pnpm dev:vue3.

Commits & releases

Use pnpm commit. This uses the cz-git CLI to create a conventional commit message based on your changes. CI is setup to release all new commits on the main branch that contains a new changeset.

Read more about changeset here

Get involved

PRs Welcome

We appreciate any help on our repositories. For more details about how to contribute to a package, see the README of the corresponding package.

Reach out to us

Create an issue using one of the templates File an issue. Make sure to remove any credential from your code before sharing it.

License

This repository is published under the MIT license.

Contributors

Thanks goes to these wonderful people (emoji key):

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --> <!-- prettier-ignore-start --> <!-- markdownlint-disable --> <table> <tbody> <tr> <td align="center" valign="top" width="14.28%"><a href="https://github.com/MiracleH"><img src="https://avatars.githubusercontent.com/u/22657524?v=4?s=100" width="100px;" alt="hyj"/><br /><sub><b>hyj</b></sub></a><br /><a href="https://github.com/i7eo/google-translate-select/commits?author=MiracleH" title="Code">๐Ÿ’ป</a></td> <td align="center" valign="top" width="14.28%"><a href="https://yesux.github.io/"><img src="https://avatars.githubusercontent.com/u/44074974?v=4?s=100" width="100px;" alt="suxiong"/><br /><sub><b>suxiong</b></sub></a><br /><a href="https://github.com/i7eo/google-translate-select/commits?author=YeSuX" title="Code">๐Ÿ’ป</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/ubercj"><img src="https://avatars.githubusercontent.com/u/73803823?v=4?s=100" width="100px;" alt="Chris Jones"/><br /><sub><b>Chris Jones</b></sub></a><br /><a href="https://github.com/i7eo/google-translate-select/commits?author=ubercj" title="Code">๐Ÿ’ป</a></td> <td align="center" valign="top" width="14.28%"><a href="https://info.souldoit.com"><img src="https://avatars.githubusercontent.com/u/15118790?v=4?s=100" width="100px;" alt="Syamsoul Azrien Muda"/><br /><sub><b>Syamsoul Azrien Muda</b></sub></a><br /><a href="https://github.com/i7eo/google-translate-select/commits?author=syamsoul" title="Code">๐Ÿ’ป</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/huazhuangnan"><img src="https://avatars.githubusercontent.com/u/46070704?v=4?s=100" width="100px;" alt="HuaZhuangNan"/><br /><sub><b>HuaZhuangNan</b></sub></a><br /><a href="https://github.com/i7eo/google-translate-select/commits?author=huazhuangnan" title="Code">๐Ÿ’ป</a></td> <td align="center" valign="top" width="14.28%"><a href="https://collins-odongo.netlify.app/"><img src="https://avatars.githubusercontent.com/u/86556838?v=4?s=100" width="100px;" alt="Zero"/><br /><sub><b>Zero</b></sub></a><br /><a href="https://github.com/i7eo/google-translate-select/commits?author=zero-stealth" title="Documentation">๐Ÿ“–</a></td> </tr> </tbody> </table> <!-- markdownlint-restore --> <!-- prettier-ignore-end --> <!-- ALL-CONTRIBUTORS-LIST:END --> <!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --> <!-- prettier-ignore-start --> <!-- markdownlint-disable --> <!-- markdownlint-restore --> <!-- prettier-ignore-end --> <!-- ALL-CONTRIBUTORS-LIST:END -->