All Projects → tanmuhittin → Laravel Google Translate

tanmuhittin / Laravel Google Translate

Licence: mit
Translate translation files to other languages using google translate or another translation api

Labels

Projects that are alternatives of or similar to Laravel Google Translate

Laravel Postal Code Validation
Worldwide postal code validation for Laravel and Lumen
Stars: ✭ 278 (-3.14%)
Mutual labels:  laravel
Tipask
Tipask是一款开放源码的PHP问答系统,基于Laravel框架开发,容易扩展,具有强大的负载能力和稳定性。
Stars: ✭ 282 (-1.74%)
Mutual labels:  laravel
Wookteam
WookTeam是一款轻量级的开源在线团队协作工具,提供各类文档协作工具、在线思维导图、在线流程图、项目管理、任务分发、即时IM,知识库管理等工具。
Stars: ✭ 287 (+0%)
Mutual labels:  laravel
Laravel Dashboard
A beautiful dashboard for Laravel
Stars: ✭ 280 (-2.44%)
Mutual labels:  laravel
Laravel Job Status
Add ability to track Job progress, status and result dispatched to Queue.
Stars: ✭ 279 (-2.79%)
Mutual labels:  laravel
Laravel Sign In With Apple
Provide "Sign In With Apple" functionality to your Laravel app.
Stars: ✭ 283 (-1.39%)
Mutual labels:  laravel
Dnsrecords.io
A webapp to fetch dns records
Stars: ✭ 278 (-3.14%)
Mutual labels:  laravel
S Cart
Free Laravel open source e-commerce for business: shopping cart, cms content, and more...
Stars: ✭ 286 (-0.35%)
Mutual labels:  laravel
Resources I Like
📚💯 Collection of learning resources i like
Stars: ✭ 280 (-2.44%)
Mutual labels:  laravel
Laravel Apidoc Generator
Laravel API Documentation Generator
Stars: ✭ 3,170 (+1004.53%)
Mutual labels:  laravel
Laravel Achievements
Achievements for Laravel 5.3+
Stars: ✭ 279 (-2.79%)
Mutual labels:  laravel
Laravel Setting
Persistent settings package for Laravel
Stars: ✭ 278 (-3.14%)
Mutual labels:  laravel
Laravel Gymie
👨‍💻 Gym & Club Management System https://gymie.in
Stars: ✭ 285 (-0.7%)
Mutual labels:  laravel
Ssrpanel
An Account Managent Panel Which Is Used For Shadowsocks & ShadowsocksR & V2Ray & VNET
Stars: ✭ 279 (-2.79%)
Mutual labels:  laravel
Laravel Websockets Demo
Demo application to use with the Laravel WebSockets package.
Stars: ✭ 286 (-0.35%)
Mutual labels:  laravel
Lightcms
LightCMS是一个基于Laravel开发的轻量级CMS系统,也可以作为一个通用的后台管理框架使用。
Stars: ✭ 279 (-2.79%)
Mutual labels:  laravel
Apilogger
Small laravel package for viewing api logs which can be used in debugging.
Stars: ✭ 285 (-0.7%)
Mutual labels:  laravel
Laravel Vue Admin
开箱即用的Laravel后台扩展,前后端分离,后端控制前端组件,无需编写vue即可创建一个vue+vuex+vue-route+elment-ui+laravel的项目 ,丰富的表单 表格组件,强大的自定义组件功能。
Stars: ✭ 287 (+0%)
Mutual labels:  laravel
Laravel Deploy On Shared Hosting
The simple guide to deploy Laravel application to shared hosting services.
Stars: ✭ 288 (+0.35%)
Mutual labels:  laravel
Stripe Laravel
Cartalyst Stripe package integration for Laravel.
Stars: ✭ 286 (-0.35%)
Mutual labels:  laravel

laravel-google-translate

  • Translate translation files (under /resources/lang) or lang.json files
  • Provide extra facade functions Str::apiTranslate and Str::apiTranslateWithAttributes

by using stichoza/google-translate-php or Google Translate API https://cloud.google.com/translate/ or Yandex Translatin API https://tech.yandex.com/translate/

Str facade api-translation helpers

This package provides two translation methods for Laravel helper Str

  • Illuminate\Support\Str::apiTranslate -> Translates texts using your selected api in config
  • Illuminate\Support\Str::apiTranslateWithAttributes -> Again translates texts using your selected api in config in addition to that this function respects Laravel translation text attributes like :name

how to use your own translation api

  • Create your own translation api class by implementing Tanmuhittin\LaravelGoogleTranslate\Contracts\ApiTranslatorContract
  • Write your classname in config laravel_google_translate.custom_api_translator . Example : Myclass::class
  • Write your custom apikey for your custom class in laravel_google_translate.custom_api_translator_key

Now all translations will use your custom api.

installation

composer require tanmuhittin/laravel-google-translate
php artisan vendor:publish --provider="Tanmuhittin\LaravelGoogleTranslate\LaravelGoogleTranslateServiceProvider"

If you would like to use stichoza/google-translate-php you do not need an API key. If you would like to use Google Translate API, edit config/laravel_google_translate.php and add your Google Translate API key.

php artisan config:cache

Then you can run

php artisan translate:files

See it on action:

laravel-google-translate

potential issues

SSL certificate problem: unable to get local issuer certificate

https://stackoverflow.com/a/31830614

suggested packages

This package can be used with https://github.com/andrey-helldar/laravel-lang-publisher.

Done

finally

Thank you for using laravel-google-translate :)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].