Translate laravel resource, vendor, folder or file from google translation without requiring any api information

Overview

Laravel Go Translate

Translate laravel resource, vendor, folder or file from google translation without requiring any api information.

Issues Forks Stars Download License

Laravel go translate

Table of contents

Installation

To install this package through composer run the following command in the terminal

composer require codebuglab/laravel-go-translate

Or if you want to use it only on development mode

composer require codebuglab/laravel-go-translate --dev

Translate Commands

  • This package can translate laravel project by multiple ways from php or json files

Resource

php artisan go-translate:resource {sourceLang} {destinationLang}
  • This command take sourceLang and destinationLang as variables and translate all files in resources/lang/{sourceLang} to resources/lang/{destinationLang}
php artisan go-translate:resource en ar
  • This is an example of a command will translate all files in resources/lang/en folder and transfer them to resources/lang/ar folder after translation from en to ar

Vendor

php artisan go-translate:vendor {sourceLang} {destinationLang}
  • This command take sourceLang and destinationLang as variables and translate all files in resources/lang/vendor/{sourceLang} to resources/lang/vendor/{destinationLang}
php artisan go-translate:vendor en ar
  • This is an example of a command will translate all files in resources/lang/vendor/en folder and transfer them to resources/lang/vendor/ar folder after translation from en to ar

Folder

php artisan go-translate:folder {sourceLang} {destinationLang} {sourceFolder} {destinationFolder}
  • This command take sourceLang, destinationLang, sourceFolder and destinationFolder as variables and translate all files in {sourceFolder} to {destinationFolder} from {sourceLang} to {destinationLang}
php artisan go-translate:folder en ar resources/lang/en resources/lang/test_folder
  • This is an example of a command will translate all files in resources/lang/en folder and transfer them to resources/lang/test_folder folder after translation from en to ar

File

php artisan go-translate:file {sourceLang} {destinationLang} {sourcePath} {destinationPath}
  • This command take sourceLang, destinationLang, sourcePath and destinationPath as variables and translate {sourcePath} file to {destinationPath} from {sourceLang} to {destinationLang}
php artisan go-translate:file en ar resources/lang/en/auth.php resources/lang/test_folder/new_name.php
  • This is an example of a command will translate the file in resources/lang/en/auth.php and transfer it to resources/lang/test_folder/new_name.php file after translation from en to ar

Options

Extension

php artisan go-translate:resource {sourceLang} {destinationLang} {--E=json}
  • --E is an optional variable you can convert php files to json during translation
php artisan go-translate:resource en ar --E=json
  • This option wouldn't only translate files in resources/lang/en to resources/lang/ar, This will also convert files to json during translation
  • An example of that resources/lang/en/auth.php which is based laravel file created with all projects will translate and save at resources/lang/ar/auth.json
  • Current extension options for reading and converting are json, php

Notices

  • this package build upon dejurin/php-google-translate-for-free package which use google translate to translate languages and some times you take bans from google for translating multiple lines in a few amount of time, So and for now if you face some problems during translating exit command by clicking ctrl+c and try to change your ip address of wait for couple or hours till the ban ends.
  • Supported languages are listed in Google API docs you might need to take a look for the ISO-639-1 code which will use to translate your language.

Testing

To run test use this command vendor/bin/phpunit

License

This package is a free software distributed under the terms of the MIT license.

You might also like...
A Full Stack login/register system using a MySQL database to store the information
A Full Stack login/register system using a MySQL database to store the information

This is a Full Stack login/register system using a MySQL database to store the information. I created this to sharpen my Full Stack Development skills.

Library JGU is a website created for a university library system information. Made with PHP & TailwindCSS.
Library JGU is a website created for a university library system information. Made with PHP & TailwindCSS.

Library JGU Library JGU is a website created for a university library system information. Made with PHP & TailwindCSS. Key Features • How To Use • Rel

A micro web application providing a REST API on top of any relational database, using Silex and Doctrine DBAL

Microrest is a Silex provider to setting up a REST API on top of a relational database, based on a YAML (RAML) configuration file.

Exploit the vulnerability to install arbitrary applications in k61v1 without ROOT

k61v1injector Arbitrary application installer for Qin F21 Pro Exploit the vulnerability to install arbitrary applications in k61v1 without ROOT. Feel

QuidPHP/Navigation contains a JavaScript module for a website navigation without reloading.

QuidPHP/Navigation contains a JavaScript module for a website navigation without reloading.

Automatic SASS-to-CSS compiling for Laravel 4 (and any other framework too), config-free, in pure PHP, works with latest SASS 3.2 .scss syntax, imports and mixins

laravel-sass Automatic Sass-to-CSS compiling for Laravel 4 (and any other framework by the way) while being in development. Every time you run your ap

ToDoList With JetStearm. WireUI, LivewireUIModal, SweetAlert2 and Google Socialite Auth.

✔️ DoList DoList - Easy way to manage To Do List. 🖥️ Demo Demo: DoList.ir ScreenShots: ScreenShots 🔌 Requirements PHP version: = 7.4 Composer Node.

Simple PHP package to get any Facebook Page posts

Get Facebook Page Feed It is simple wrapper class written in php to fetch posts from certain Facebook page. Currently I am using Facebook graph API wi

Comments
  • .mp4 files not being supported

    .mp4 files not being supported

    Hello, i've tried this but when i tried to translate the .mp4 files it told me that We don't support this extension for this file '.mp4 "

    Is there any way that it can work with .mp4 files ?

    opened by abzzzmedia 1
Releases(v1.0.1)
Owner
CodeBugLab
CodeBugLab
TinyFileManager is web based file manager and it is a simple, fast and small file manager with a single file, multi-language ready web application

TinyFileManager is web based file manager and it is a simple, fast and small file manager with a single file, multi-language ready web application for storing, uploading, editing and managing files and folders online via web browser. The Application runs on PHP 5.5+, It allows the creation of multiple users and each user can have its own directory and a build-in support for managing text files with cloud9 IDE and it supports syntax highlighting for over 150+ languages and over 35+ themes.

Prasath Mani 3.5k Jan 7, 2023
Rinvex Bookable is a generic resource booking system for Laravel, with the required tools to run your SAAS like services efficiently

Rinvex Bookings is a generic resource booking system for Laravel, with the required tools to run your SAAS like services efficiently. It has a simple architecture, with powerful underlying to afford solid platform for your business.

Rinvex 435 Jan 5, 2023
This is a plugin written in PHP programming language and running on the PocketMine platform that works stably on the API 4.0.0 platform. It allows you to query some other server information

QueryServer This is a plugin written in PHP programming language and running on the PocketMine platform that works stably on the API 4.0.0 platform. I

Thành Nhân 1 Jul 6, 2022
Simple searching for postcodes to retrieve geographic information. Support for various API providers and a unified address/output format.

Postcode Search Simple searching for postcodes to retrieve geographic information. Support for various API providers and a unified address/output form

Gary Green 10 Nov 29, 2022
A self-hosted, drag-and-drop, & nosql file conversion server that supports 62x file formats

A self-hosted, drag-and-drop, & nosql file conversion server that supports 62x file formats

Justin Grimes 388 Dec 26, 2022
Instagram automation represents the use of third-party software to manage your account, carry out tasks and/or interact with users without a human present. Bulit in Laravel Framework

How to Deploy laravel project to heroku Video Link : https://youtu.be/7Nq_a2QiaHo Home Page Login Page Dashboard Page About Laravel Laravel is a web a

null 1 Dec 3, 2021
phpSysInfo: a customizable PHP script that displays information about your system nicely

phpSysInfo Copyright (c), 1999-2008, Uriah Welcome (sf.net/users/precision) Copyright (c), 1999-2009, Michael Cramer (sf.net/users/bigmichi1) Copyrigh

phpSysInfo 1.3k Jan 1, 2023
Infopanel is a simple tool getting some information from source. It works basically like a slider that shows only title, image, a little bit description and QR-Code for links.

Infopanel is a simple tool getting some information from source. It works basically like a slider that shows only title, image, a little bit description and QR-Code for links. It has its own GUI for the editing. The GUI provides a very simple role concept. This tool can be used for digital signage, Information panels, News or Events or similar.

null 4 Aug 22, 2022
Online chatting application through a logical decentralized blockchain network that stores chat information and hashing keys implemented using AJAX, JQuery, PHP, SQL, CSS, and HTML

Online chatting application through a logical decentralized blockchain network that stores chat information and hashing keys implemented using AJAX, JQuery, PHP, SQL, CSS, and HTML. The blockchain stores a previous hash value, current hash value, time, chat data, and a special key(nonce) used for encryption in each block (node).

Dave Sharma 1 Jan 4, 2022
CheckIP - A composer module to retrieve information from an IP address

A composer module to retrieve information from an IP address, using geoplugin.net Installation Use composer to install CheckIP composer requir

IsMyStore 1 Aug 9, 2022