Laravel向けにGoogle Cloud AI API翻訳とGoogle翻訳を実装する

電子機器、白黒
Table of Contents

Laravelベースのウェブサイトを運営している方にとって、正確で自然な翻訳コンテンツを提供することは、 Laravel ウェブサイトを翻訳し 、優れたユーザー体験を提供するために非常に重要です。

幸いなことに、開発者がこの課題を克服するのを支援する自動翻訳サービスがいくつか利用可能です。たとえば、Google Cloud AI API Translation や Google Translate などがあります。どちらのサービスも機械技術を活用した翻訳機能を提供しています。.

この記事では、 Google Cloud AI Translation と Google Translate を Laravel アプリケーションに実装する際の主な違いを探り、あなたの Laravel ウェブサイトに最適な翻訳サービスをご紹介します。 

Google Cloud AI API翻訳とGoogle翻訳とは?

議論に入る前に、Google Cloud AI API と Google Translate の翻訳それぞれの意味について説明します。.

Google Cloud AI API翻訳

Google Cloudのサーバーとクラウドストレージ

Google Cloud AI API Translationは、Google Cloud Platformが提供する高度な 自動翻訳サービス です。このサービスは、最新の人工知能(AI)と機械学習技術を活用して、テキスト、音声、ドキュメントを正確かつ自然に翻訳します。

Google Cloud AI API Translationはディープラーニングに基づくニューラル翻訳モデルを使用しており、言語のニュアンスや文脈をより適切に捉え、実際の言語使用に沿ったより自然な翻訳を提供します。さらに、Google Cloud AI Translationは最大500,000文字まで無料で利用でき、次の75,000文字には100万文字あたり$20のコストがかかります。. 

Google 翻訳

翻訳設定インターフェース。言語設定オプション。.

一方、Google Translateは長年にわたり広く知られている自動テキスト翻訳サービスです。より伝統的な統計的翻訳アプローチを採用しており、大規模なトレーニングデータセットから学習したパターンと確率に基づいて翻訳を生成します。.

Google Cloud AI API Translation ほど精度や言語のニュアンスの処理において高度ではありませんが、Google Translate は使いやすさと非商用利用での無料提供により、依然として人気のある選択肢です。.

Laravel で Google Cloud AI API 翻訳を実装する

Linguiseを含むいくつかの翻訳サービスは、 Linguise、 AI翻訳 クラウド技術を使用してウェブサイトを翻訳しています。

言語翻訳サービスは、翻訳技術の一つとしてクラウドAI APIを使用しています。以下は、 実装手順です: Laravel ウェブサイト。 ここでは、すでに Laravel プロジェクトのウェブサイトが準備されていることを前提としています。

Linguiseアカウントを作成

Linguiseを使用するには、まず Linguise、 アカウントを登録 する必要があります。無料で登録することも、1ヶ月または1年間のサブスクリプションを購入することもできます。必要な情報は、メールアドレス、ユーザー名、パスワードなどだけです。

Laravel のウェブサイト情報を追加する

その後、使用するウェブサイトに関する情報を追加し、 Linguise アカウント情報とウェブURLを入力し、 Laravel プラットフォームを選択し、デフォルト言語とウェブサイトに追加したい言語を追加します。.

 

読み込みアニメーション

次に、以下のボタンからPHPスクリプトをダウンロードし、お使いのコンピューターに保存してください。.

PHP スクリプトのアップロードと設定

スクリプトをダウンロードしたら、解凍して Laravel がインストールされているルートフォルダにアップロードしてください。 Laravel インストールのルート(通常はCMSファイルがある場所)に配置されていることを確認してください。フォルダ名が「linguise」(解凍時のデフォルト名)であることを確認してください。.

コンピューターのファイルシステムナビゲーションメニュー

次に、 Linguise APIキーを、サーバーにアップロードした…/linguise/Configuration.phpファイルにコピーする必要があります。ファイルを編集し、引用符の間にAPIキーを貼り付け、REPLACE_BY_YOUR_TOKENというテキストを置き換えてください。.

コード構成のスクリーンショット

言語切り替えのスクリプトを挿入する

次に、 Linguise 。ダッシュボードから取得した言語切り替えスクリプトを挿入します

スクリプト言語スイッチャー - Laravel向けGoogle Cloud AI API翻訳とGoogle翻訳の実装比較

resources/views/layouts/ ディレクトリ内の front.blade.php ファイルに挿入されます。挿入されたスクリプトのプレビューはこちらです。.

コード出力のあるターミナルウィンドウ

.htaccessを設定する

最後に、言語ベースのURLを.htaccessファイルで設定する必要があります。ファイルに「RewriteBase /」が含まれている場合は、その行の後に以下のコードをコピーして貼り付けるだけです。.

				
					<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteRule ^(af|sq|am|ar|hy|az|eu|be|bn|bs|bg|ca|ceb|ny|zh-cn|zh-tw|co|hr|cs|da|nl|en|eo|et|tl|fi|fr|fy|gl|ka|de|el|gu|ht|ha|haw|iw|hi|hmn|hu|is|ig|id|ga|it|ja|jw|kn|kk|km|ko|ku|ky|lo|la|lv|lt|lb|mk|mg|ms|ml|mt|mi|mr|mn|my|ne|no|ps|fa|pl|pt|pa|ro|ru|sm|gd|sr|st|sn|sd|si|sk|sl|so|es|su|sw|sv|tg|ta|te|th|tr|uk|ur|uz|vi|cy|xh|yi|yo|zu|zz-zz)(?:$|/)(.*)$ linguise/linguise.php?linguise_language=$1&original_url=$2 [L,QSA]
</IfModule>
				
			

完了しました。この時点で、 Linguise サービス上でクラウド AI API Translation の実装に成功しました。次に、 Laravel のウェブサイトを確認できます。デフォルトの言語切り替えツールが表示され、 ダッシュボードから Laravel の言語切り替えツールをカスタマイズできます。

暗い背景と神秘的な雰囲気を持つ男性

Laravel に Google Translate を実装する

次に、 LaravelでGoogle翻訳を実装してみます。ここでは、 Laravel プロジェクトを正常に作成済みで、Google翻訳を追加するだけでよいと仮定します。.

以下のインストール手順は、 公式の Laravel ウェブサイトでもご確認いただけます。

Google翻訳パッケージをインストール

Google Translatorパッケージをインストールするには、プロジェクトのプロンプトを開き、次のコマンドを入力します。このパッケージにより、google-translator-languageの動作機能を利用できるようになります。.

				
					composer require stichoza/google-translate-php
				
			

Google Translator パッケージの設定

アプリケーション内で「Google翻訳パッケージ」を設定する必要があります。/configフォルダ内のapp.phpファイルを開き、「aliases」セクションを見つけて、以下のコード行を追加してください。.

画面上にコーディングテキストが表示されたコンピュータ端末。ディスプレイには様々なコード行が表示されています。.
				
					/*
|--------------------------------------------------------------------------
| Class Aliases
|--------------------------------------------------------------------------
|
| This array of class aliases will be registered when this application
| is started. However, feel free to register as many as you wish as
| the aliases are "lazy" loaded so they don't hinder performance.
|
*/

'aliases' => Facade::defaultAliases()->merge([
    // 'Example' => App\Facades\Example::class,
    'GoogleTranslate' => Stichoza\GoogleTranslate\GoogleTranslate::class,
])->toArray(),

				
			

言語コントローラーの設定

以下のような言語コントローラーファイルを作成する必要があります

				
					php artisan make:controller LangController
				
			

/app/Http/Controllersフォルダ内にLangController.phpファイルを作成します。.

コード行が表示されたコンピューター画面
				
					<?php

namespace App\Http\Controllers;

use Illuminate\Contracts\View\View;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\App;

class LangController extends Controller
{
    public function index(): View
    {
        return view('lang');
    }

    public function change(Request $request)
    {
        App::setLocale($request->lang);
        
        session()->put('locale', $request->lang);

        return redirect()->back();
    }
}


				
			

Bladeテンプレートファイルを作成する

/resources/views フォルダに移動し、lang.blade.php という名前のファイルを作成します。ファイルを開き、次のコードを挿入してください。.

コンピューター画面に表示されたコードの画像。プログラミングのテキスト。.
				
					<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Laravel 10 Create Multi Language Website Tutorial</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.1/dist/css/bootstrap.min.css">
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>

<script type="application/ld+json" class="gnpub-schema-markup-output">
{"@context":"https:\/\/schema.org\/","@type":"NewsArticle","@id":"https:\/\/www.linguise.com\/blog\/guide\/implement-google-cloud-ai-api-translation-vs-google-translate-for-laravel\/#newsarticle","url":"https:\/\/www.linguise.com\/blog\/guide\/implement-google-cloud-ai-api-translation-vs-google-translate-for-laravel\/","image":{"@type":"ImageObject","url":"https:\/\/www.linguise.com\/wp-content\/uploads\/2024\/05\/Implement-Google-Cloud-AI-API-translation-vs-Google-Translate-for-Laravel-150x150.png","width":150,"height":150},"headline":"Implement Google Cloud AI API translation vs Google Translate for Laravel","mainEntityOfPage":"https:\/\/www.linguise.com\/blog\/guide\/implement-google-cloud-ai-api-translation-vs-google-translate-for-laravel\/","datePublished":"2024-05-31T07:32:47+00:00","dateModified":"2024-08-26T19:19:15+00:00","description":"For those of you who own Laravel-based websites, providing accurate and natural translation content is very important to translate your website and offer a good","articleSection":"Guide","articleBody":"For those of you who own Laravel-based websites, providing accurate and natural translation content is very important to translate your website and offer a good user experience.\nFortunately, several automatic translation services are available to help developers overcome this challenge, including Google Cloud AI API Translation and Google Translate. Both services offer translation capabilities using machine technology.\nIn this article, we will explore the main differences between implementing Google Cloud AI Translation and Google Translate for Laravel applications and recommend the best translation services for your Laravel website.&nbsp;\t\t\n\t\t\tWhat are Google Cloud AI API translation &amp; Google Translate?\n\t\t\n\t\tBefore entering into the discussion, we will discuss the respective meanings of Google Cloud AI API and Google Translate translations.\t\t\n\t\t\tGoogle Cloud AI API translation\n\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\tGoogle Cloud AI API Translation is an advanced automatic translation service provided by Google Cloud Platform. This service leverages the latest artificial intelligence (AI) and machine learning technologies to deliver accurate and natural translations of text, voice, and documents.Google Cloud AI API Translation uses neural translation models based on deep learning, which allows it to capture language nuances and context better, providing more idiomatic translations that align with actual language usage. Additionally, using Google Cloud AI Translation for up to 500,000 characters is free of charge, while the next 75,000 characters will incur a cost of $20 per million characters.\u00a0\t\t\n\t\t\tGoogle Translate\n\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\tMeanwhile, Google Translate is a long-standing and widely known automatic text translation service. It uses a more traditional statistical translation approach, which generates translations based on patterns and probabilities learned from large training datasets.Although it is not as advanced as Google Cloud AI API Translation in terms of accuracy and handling language nuances, Google Translate remains a popular choice due to its ease of use and free availability for non-commercial use.\t\t\n\t\t\tImplement Google Cloud AI API translation on Laravel\n\t\t\n\t\tSeveral translation services, including Linguise, use AI Translation cloud technology to translate websites.The language translation service uses cloud AI API as one of its translation technologies. The following are the implementation steps on the Laravel website. We assume here that you already have a ready Laravel project website.\t\t\n\t\t\tCreate Linguise account\n\t\t\n\t\tTo use Linguise, you must register an account first. You can do this for free or subscribe for one month or a year. You only need to provide information such as your email, username, and password.\t\t\n\t\t\tAdd Laravel website info\n\t\t\n\t\tAfter that, add information about the website you will use, enter your Linguise account info and web URL, select the Laravel platform, and add the default language and the language you want to add to the website.\u00a0\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\tThen download the PHP script via the following button and save it on your local computer.\t\t\n\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tDOWNLOAD PHP-JS TRANSLATION SCRIPT\n\t\t\t\t\t\n\t\t\tUpload and configure the PHP script\n\t\t\n\t\tAfter downloading the script, unzip it and upload it to the root folder where Laravel is installed. Ensure it is located at the root of your Laravel installation (typically where your CMS files are). Ensure the folder is named \"linguise\" (the default name when the folder is unzipped).\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\tThen, the Linguise API key must be copied into the \u2026\/linguise\/Configuration.php file you uploaded to your server. Edit the file and paste your API key between the quotes, replacing the text REPLACE_BY_YOUR_TOKEN.\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\tInsert script of language switcher\t\t\n\t\tNext, insert the language switch script that you got from the Linguise dashboard.\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\tInserted into the front.blade.php file in the resources\/views\/layouts\/ directory. Here is a preview of the inserted script.\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\tConfigure .htaccess\n\t\t\n\t\tLastly, language-based URLs need to be configured in the .htaccess file. If your file includes \"RewriteBase \/,\" simply copy and paste the following code after that line.\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n  RewriteEngine On\n  RewriteRule ^(af|sq|am|ar|hy|az|eu|be|bn|bs|bg|ca|ceb|ny|zh-cn|zh-tw|co|hr|cs|da|nl|en|eo|et|tl|fi|fr|fy|gl|ka|de|el|gu|ht|ha|haw|iw|hi|hmn|hu|is|ig|id|ga|it|ja|jw|kn|kk|km|ko|ku|ky|lo|la|lv|lt|lb|mk|mg|ms|ml|mt|mi|mr|mn|my|ne|no|ps|fa|pl|pt|pa|ro|ru|sm|gd|sr|st|sn|sd|si|sk|sl|so|es|su|sw|sv|tg|ta|te|th|tr|uk|ur|uz|vi|cy|xh|yi|yo|zu|zz-zz)(?:$|\/)(.*)$ linguise\/linguise.php?linguise_language=$1&original_url=$2 [L,QSA]\n\n\t\t\t\t\n\t\t\t\n\t\tDone. At this point, you have successfully implemented cloud AI API Translation on the Linguise service. Now, you can check the Laravel website. A default language switcher will appear, and you can customize the Language switcher for Laravel via the dashboard.\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\tImplement Google Translate on Laravel\t\t\n\t\tNow we will try to implement Google Translate in Laravel. Here we assume that you have successfully created a Laravel project and just need to add Google Translate.You can also find the following installation steps on the official Laravel website.\t\t\n\t\t\tInstall Google Translator Package\n\t\t\n\t\tTo install the Google Translator Package, open the project prompt and input the following command. This package will enable you to utilize the working functions of the google-translator-language.\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\tcomposer require stichoza\/google-translate-php\n\t\t\t\t\n\t\t\t\n\t\t\tSetting of Google Translator Package\n\t\t\n\t\tWe must set up the \"google translator package\" within the the application. Open the app.php file in the \/config folder, find the \"aliases\" section, and add the following line of code.\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\/*\n|--------------------------------------------------------------------------\n| Class Aliases\n|--------------------------------------------------------------------------\n|\n| This array of class aliases will be registered when this application\n| is started. However, feel free to register as many as you wish as\n| the aliases are \"lazy\" loaded so they don't hinder performance.\n|\n*\/\n'aliases' => Facade::defaultAliases()->merge([\n    \/\/ 'Example' => AppFacadesExample::class,\n    'GoogleTranslate' => StichozaGoogleTranslateGoogleTranslate::class,\n])->toArray(),\n\n\t\t\t\t\n\t\t\t\n\t\t\tSetup Language Controller\n\t\t\n\t\tYou need to create a language controller file like the following\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\tphp artisan make:controller LangController\n\t\t\t\t\n\t\t\t\n\t\tIt will create LangController.php file inside \/app\/Http\/Controllers folder.","keywords":"","name":"Implement Google Cloud AI API translation vs Google Translate for Laravel","thumbnailUrl":"https:\/\/www.linguise.com\/wp-content\/uploads\/2024\/05\/Implement-Google-Cloud-AI-API-translation-vs-Google-Translate-for-Laravel-150x150.png","wordCount":809,"timeRequired":"PT3M35S","mainEntity":{"@type":"WebPage","@id":"https:\/\/www.linguise.com\/blog\/guide\/implement-google-cloud-ai-api-translation-vs-google-translate-for-laravel\/"},"author":{"@type":"Person","name":"Tristan","url":"https:\/\/www.linguise.com\/author\/tristan\/","sameAs":[],"image":{"@type":"ImageObject","url":"https:\/\/secure.gravatar.com\/avatar\/50d7238660b192d8d54ebf6367be5e97bb41c24dbd190daae062d931efd351ae?s=96&d=mm&r=g","height":96,"width":96}},"editor":{"@type":"Person","name":"Tristan","url":"https:\/\/www.linguise.com\/author\/tristan\/","sameAs":[],"image":{"@type":"ImageObject","url":"https:\/\/secure.gravatar.com\/avatar\/50d7238660b192d8d54ebf6367be5e97bb41c24dbd190daae062d931efd351ae?s=96&d=mm&r=g","height":96,"width":96}}}
</script>
</head>

<body>
    <div class="container mt-5">
        <div class="row">
            <div class="col-md-12">
                <div class="card w-75 m-auto">
                    <div class="card-header text-center bg-primary text-white">
                        <h4 style="font-size: 17px;">Laravel 10 Create Multi Language Website Tutorial</h4>
                    </div>
                    <div class="card-body">
                        <div class="row">
                            <div class="col-md-4">
                                <strong>Select Language: </strong>
                            </div>
                            <div class="col-md-4">
                                <select class="form-select changeLang">
                                    <option value="en" {{ session()->get('locale') == 'en' ? 'selected' : '' }}>
                                        English
                                    </option>
                                    <option value="fr" {{ session()->get('locale') == 'fr' ? 'selected' : '' }}>
                                        French
                                    </option>
                                    <option value="ar" {{ session()->get('locale') == 'ar' ? 'selected' : '' }}>
                                        Arabic
                                    </option>
                                    <option value="hi" {{ session()->get('locale') == 'hi' ? 'selected' : '' }}>
                                        Hindi
                                    </option>
                                </select>
                            </div>
                        </div>

                        <div style="margin-top: 20px;">
                            <p>{{ GoogleTranslate::trans('Welcome to Online Web Tutor', app()->getLocale()) }}</p>
                            <p>{{ GoogleTranslate::trans('It is a passionate and innovative Web Development Community dedicated to empowering aspiring web developers with the latest tools and techniques. Our platform offers a comprehensive range of web development courses, including PHP and its frameworks, Node.js, MySQL, Javascript and WordPress.', app()->getLocale()) }}
                            </p>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!--- Language Change event from Dropdown --->
    <script type="text/javascript">
    var url = "{{ route('changeLang') }}";

    $(".changeLang").change(function() {
        window.location.href = url + "?lang=" + $(this).val();
    });
    </script>

</body>

</html>

				
			

言語ミドルウェアの設定

プロジェクトのターミナルを開き、このコマンドを実行してください。

				
					php artisan make:middleware LanguageManager


				
			

/app/Http/Middlewareフォルダ内にLanguageManager.phpファイルを作成し、これを貼り付けます。.

白黒のピクセル画像。鮮明な細部は見えません。.
				
					<?php

namespace App\Http\Middleware;

use Closure;
use Illuminate\Http\Request;
use Symfony\Component\HttpFoundation\Response;
use Illuminate\Support\Facades\App;

class LanguageManager
{
    /**
     * Handle an incoming request.
     *
     * @param  \Closure(\Illuminate\Http\Request): (\Symfony\Component\HttpFoundation\Response)  $next
     */
    public function handle(Request $request, Closure $next): Response
    {
        if (session()->has('locale')) {

            App::setLocale(session()->get('locale'));
        }

        return $next($request);
    }
}

				
			

Kernel.php を介して言語ミドルウェアを登録する

/app/HttpディレクトリにあるKernel.phpファイルを開きます。$middlewareGroups配列を探し、webセクションに移動してください。.

黒い背景にぼやけたテキストの画像。テキストは判読できません。.
				
					/**
 * The application's route middleware groups.
 *
 * @var array<string, array<int, class-string|string>>
 */
protected $middlewareGroups = [
    'web' => [
        
        //...

        \App\Http\Middleware\LanguageManager::class,
    ],

    'api' => [
        
        //...
    ],
];

				
			

ルートを追加

/routesフォルダからweb.phpを開き、これらのルートを追加してください。.

Web.php - Google Cloud AI API翻訳の実装 vs Laravel向けGoogle翻訳 Laravel
				
					//...
use App\Http\Controllers\LangController;

//...

Route::get('lang/home', [LangController::class, 'index']);
Route::get('lang/change', [LangController::class, 'change'])->name('changeLang');


				
			

テストウェブサイト

プロジェクト ターミナルでこのコマンドを実行して、開発サーバーを起動します。.

				
					php artisan serve
				
			

作成された Laravel ウェブサイトの表示はこちらです。ウェブサイト onlinewebtutorblog.com  から、以下の表示でわかるように、Google翻訳のドロップダウンがあります。

コンピューター画面と思われるものが歪んだ画像。.

次に、 Laravel ウェブサイトをアラビア語に翻訳したときの表示はこのようになります。.

コンピューター画面に不具合が発生し、歪んだコードとテキストが表示されます。.

LaravelでGoogle Cloud AI翻訳とGoogle翻訳を実装する違いは何ですか?

Laravelにおける Google Cloud AI と Google Translate 翻訳の各実装を理解した後、それらの違いについて説明します。.

インストールと構成のプロセス

白黒のイラスト。大きなターゲットの近くに立っている人々。.
  • Google Cloud AI API翻訳: インストールと設定のプロセスはより複雑です。Google Cloud Platform(GCP)でプロジェクトを作成し、Cloud Translation APIを有効化し、サービスアカウントを作成し、APIキーを生成し、 Laravel アプリケーションでAPIクライアントを設定する必要があるからです。これにはいくつかのステップが必要で、有効なGCPアカウントが求められます。
  • Google Translate: インストールと設定ははるかに簡単です。Composer経由でstichoza/google-translate-phpなどのサードパーティ製パッケージまたはライブラリをインストールするだけです。その後、 Laravel の設定ファイルでGoogle Translate APIキーを設定できます。

翻訳の正確性

コンピューターの周りに集まった人々。.
  • Google Cloud AI API Translation: 深層学習機能により、このサービスは複雑な言語の文脈やニュアンスをより適切に捉えることができます。これにより、直訳が難しい慣用表現、比喩的なフレーズ、言葉遊びなどをより正確に翻訳できます。
  • Google Translate: 細かい言語の文脈やニュアンスを捉えるのが苦手で、結果が堅苦しく、不自然に聞こえることがよくあります。統計的なアプローチのため、慣用表現や比喩的なフレーズの翻訳は正確さに欠けることがよくあります。

応答速度

ノートパソコンと携帯電話から飛び立つロケット船。.
  • Google Cloud AI API翻訳: Googleの堅牢なクラウドインフラストラクチャ上でホストされている最適化された ニューラル機械翻訳 モデルを使用するため、翻訳リクエストへの応答が一般的に高速です。これにより、特に長いテキストや大量の翻訳において、応答時間が短縮されます。
  • Google 翻訳: 翻訳リクエストへの応答がやや遅くなることがあり、特に長い文書やテキストの場合に顕著です。これは、統計的翻訳とニューラル翻訳を組み合わせた従来型のアプローチを採用しているためで、Google Cloud AI API 翻訳で使用されているニューラルモデルほど効率的ではない可能性があります。

カスタマイズと制御の機能

グリッチ効果で歪んだコンピューター画面。画像が破損しているようです。.
  • Google Cloud AI API Translation: 翻訳設定の指定、カスタム用語集のアップロード、 ライブエディター翻訳 インターフェースへのアクセスによる翻訳結果の手動編集など、翻訳プロセスをカスタマイズおよび制御するためのより多くのオプションを提供します。これにより、ユーザーはニーズに応じて翻訳精度を向上させることができます。
  • Google 翻訳: カスタマイズと制御のオプションはより限定的です。ユーザーは自動翻訳の結果に頼るしかなく、結果を編集したり直接カスタマイズしたりする能力はほとんどありません。

高度な機能

アクセシビリティ機能を備えたコンピューター画面とコーヒーカップ
  • Google Cloud AI API翻訳: Google Cloud AI翻訳技術には、用語集、モデル選択、AutoMLモデルなどの高度な機能があります。さらに、 LinguiseによるクラウドAI翻訳の文脈では、 翻訳除外 といった高度な機能も備えており、技術用語やブランド名などの特定の単語を行、ページ、またはURLに基づいて除外できます。
  • Google翻訳: Laravel にインストールされたGoogle翻訳は、音声ドキュメントなどを翻訳することはできません。ウェブサイト上のテキストを別の言語に翻訳することはできますが、翻訳結果を編集する機能はありません。
言語の壁を突破する
言語の壁に別れを告げ、無限の成長を手に入れましょう!今すぐ自動翻訳サービスをお試しください。.

Laravel ウェブサイトの翻訳サービスを選ぶ際に考慮すべき要素

Laravel ウェブサイトに最適な翻訳サービスを選ぶ際の考慮事項をいくつかご紹介します。.

  • 高い翻訳精度 – 最も重要な要素の一つは、生成される翻訳の正確さです。特に複雑なコンテンツやニュアンスのある言語に対して、非常に正確な翻訳が必要な場合、Google Cloud AI API Translation は Google Translate よりも良い選択肢となるかもしれません。
  • 統合と設定の容易さ — 翻訳サービスを Laravel アプリケーションにインストールして設定することを検討してください。Google Translateは通常、PHPパッケージまたはライブラリとして利用できるため、統合が容易です。一方、Google Cloud AI API Translationは、Google Cloud Platform上でより複雑な設定が必要です。
  • 機能とカスタマイズオプション – 用語集や専門用語の翻訳など、追加機能が必要な場合、 エディター翻訳 の結果、またはその他のカスタマイズオプションが必要な場合、Google Cloud AI API TranslationはGoogle翻訳よりも多くの選択肢を提供します。
  • 速度と応答時間 – 大量の翻訳量を扱うアプリケーションや高速な応答が必要なアプリケーションの場合、Google Cloud AI API Translation は通常、Google Translate よりも翻訳リクエストに迅速に応答します。
  • コストと予算 – Google Translateは非商用利用であれば無料で利用できますが、Google Cloud AI API Translationは使用量に基づく有料の課金モデルを採用しています。予算と推定翻訳量を考慮して、最もコスト効率の良いサービスを選択してください。
  • サポートとドキュメント – また、各サービスで利用可能な技術サポートとドキュメントも検討してください。Google Cloud AI API Translation は、Google によるより包括的なドキュメントとサポートを提供している可能性があります。

Linguise、 Laravel ウェブサイトに最適なクラウドAI翻訳サービス

プロフェッショナルなウェブサイトのデザインと開発サービス、SEO最適化

ここまでで、 Laravelの翻訳サービスを選ぶ際の考慮事項はすでにご理解いただけたでしょう。上記で挙げた要素のほとんどすべてが、 Linguise 翻訳サービスに備わっています。.

Linguise は、クラウドAI翻訳技術を使用してコンテンツの翻訳を生成するウェブサイト翻訳サービスです 。このサービスは、 Laravelベースのウェブサイトを翻訳するための最適なソリューションとなり得ます。なぜでしょうか?それは、 Linguise が上記の考慮事項に対応しているからです。

  • Linguise は 完璧な翻訳品質を備えています。 この精度は言語ペアによって異なりますが、 Linguise は人間の翻訳と同様に、ほぼ97%の精度を誇っています。
  • Linguise は40以上のCMSやウェブビルダーとも統合されており、 LaravelのようなPHPベースのウェブサイトとも統合されています。 Laravel。
  • 自動で翻訳されますが、 Linguise には翻訳結果を編集できるライブエディターがあります。この方法で、翻訳をビジネスの好みに合わせて調整できます。.
  • 多言語ページの読み込み時間は、元の言語のページよりわずか5%長いだけです。.
  • 当社のサービスは、月額15ドルから45ドルの3つのプランでご利用いただけます。有料サービスではありますが、翻訳可能な60万語までの30日間の無料トライアル期間もご用意しています。.
  • 最後に、 Linguise は、ガイド記事、ドキュメント、製品ニュース、YouTube動画チュートリアル、24時間365日のサポートチャットなど、あらゆる形式のカスタマーサポートを提供しています。.

以上の点から、 Linguise Laravel向けのクラウド AI 翻訳テクノロジー ソリューションとなり得ます。.

新しい市場を開拓する準備はできていますか?1ヶ月の無料トライアルで、自動翻訳サービスを無料でお試しください。クレジットカードは不要です!

Conclusion

この記事では、 Laravel ウェブアプリケーションにGoogle Cloud AI API TranslationとGoogle Translateを実装する際の主な違いについて解説しました。.

Google Cloud AI API Translationは、精度と高精度な翻訳の必要性において優れています。ただし、このサービスはより複雑な設定が必要で、Google Translateよりも高価です。一方、Google Translateは統合が簡単ですが、精度とカスタマイズオプションに制限があります。.

Linguise は、 Laravel ウェブサイトに対応したクラウドAIベースの代替翻訳サービスとして登場します。人間の翻訳にほぼ匹敵する精度、翻訳エディターのオプション、高速な読み込み時間、そして包括的なカスタマーサポートにより、 Linguise はあなたの Laravel ウェブサイトにとって優れた翻訳ソリューションとなります。.

試してみたい場合は Linguise、 無料アカウントに登録 して、翻訳語数600,000語までの30日間のトライアル期間をお楽しみください。詳細は linguise.comをご覧ください!

こちらもお読みになることをお勧めします

Don't miss out!
Subscribe to our Newsletter

ウェブサイトの自動翻訳、国際SEOなどに関するニュースを受け取りましょう!

Invalid email address
ぜひお試しください。月に1回の配信で、いつでも配信停止できます。.

メールアドレスを共有せずに離脱しないでください!

宝くじに当たる保証はできませんが、翻訳に関する興味深い情報ニュースや時折の割引をお約束します。.

Don't miss out!
Invalid email address