パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細v0.1.18

auto_app_translate

アプリを80の言語に翻訳し、設定を自動化するライブラリです。

AndroidiOSmacOSWindowsLinux
30日間ダウンロード
94
いいね数
38
Pub ポイント
115

パッケージをインストール

flutter pub add auto_app_translate

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

Auto App Translate は、Flutter/Dart パッケージであり、アプリを 80 言語に自動翻訳し、ローカライゼーション設定を簡素化します。言語の検出、翻訳ワークフロー、複数プラットフォーム間での設定管理を処理することで、国際化を簡単にします。効率的な多言語対応を求める開発者向けに設計されており、Flutter プロジェクトにスムーズに統合され、Android、iOS、macOS、Windows、Linux をサポートしています。このライブラリは翻訳の管理における手作業を削減し、アプリのグローバルなアクセシビリティを向上させます。

用途

  • マルチリンガルアプリのデプロイ
  • 自動翻訳ワークフロー
  • クロスプラットフォームローカライゼーション
  • リアルタイム言語切り替え
  • 簡素なi18nセットアップ
  • グローバルユーザー基盤のサポート

主な機能

  • 80の言語をサポート
  • 翻訳設定の自動化
  • クロスプラットフォーム互換性
  • スムーズな Flutter 統合
  • 言語検出
  • 簡単な設定

適している対象

  • グローバルアプリを開発する開発者
  • 複数の言語を管理するチーム
  • 迅速なi18n設定を必要とするプロジェクト
  • 多様な地域をターゲットにするアプリ
  • 国際的に拡大するスタートアップ
  • 動的な言語更新を必要とするアプリ

注意事項

  • 外部の翻訳サービスに依存しています
  • APIキーの設定が必要になる場合があります
  • 翻訳の品質は元のテキストに依存する
  • 極めてセンシティブなコンテンツには適していません
  • 制限されたオフライン機能
  • リアルタイム翻訳における潜在的な遅延

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

Auto App Translate

Pub

It is a library that translates apps into 80 languages and automates settings.

"Buy Me A Coffee"

How to Use?

1. Setup the config file
dependencies:
  easy_localization: ^3.0.3
  easy_localization_loader: ^2.0.0
  auto_app_translate:
  
flutter:
  assets:
    - assets/localization.csv
2. Create the asset folder and insert the localization.csv file.


lozalization.csv file download

3. Config easy_localization library. Please refer to the official documentation.
import 'package:auto_app_translate/callable/core_my/my_language_code/entity/flutter_support_language_locale.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:easy_localization_loader/easy_localization_loader.dart';
import 'package:flutter/material.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await EasyLocalization.ensureInitialized();
  runApp(
    EasyLocalization(
        supportedLocales: flutterLocalizeSupportLanguagesLocale,
        path: 'assets/localization.csv',
        assetLoader: CsvAssetLoader(), // <- important option for translation
        fallbackLocale: const Locale('en', 'US'),
        child: MyApp()
    ),
  );
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
        localizationsDelegates: context.localizationDelegates,
        supportedLocales: context.supportedLocales,
        locale: context.locale,
        home: MyHomePage()
    );
  }
}
4. Fill in the localization file.

Fill in str for the key value and the standard language (start translate language) column.

5. use tr() in your code for localization.

import 'package:easy_localization/easy_localization.dart';

tr('hello world')
6. Create a dart file in your project and paste the code below.

create auto_translation folder in your project root, and create auto_translation.dart file. and then copy paste code below.

import 'package:auto_app_translate/auto_app_translate.dart';

main() {
  AutoAppTranslate.translateAppCsvFile(
    // start translate language
    startLanguageCode: 'en',
    
    // language code to skip translation
    skipLanguageCodes: [],
    
    // str to skip translation
    skipStr: [],
    
    // csv file path
    appAssetsCsvPath: 'assets/localization.csv',
    
    // google translate api key (https://translatepress.com/docs/automatic-translation/generate-google-api-key/)
    apiKey: 'INPUT_YOUR_GOOGLE_TRANSLATE_API_KEY');
}

It works even if you don't put the Google Translate api key, but you will soon reach the free limit.
For a guide to getting the Google Translate api key, please refer to this document.

7. Run the file. The translation will be completed in the csv file.

8. Check out apps translated into more than 80 languages :)

カテゴリー

依存関係

依存関係一覧 6 件

ソースリポジトリ

このパッケージを使用しているプロジェクト

データはまだありません。