0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

SlangでGoogle SheetsとAndroidStudioプラグインSlangMateで楽々ローカライズ

Last updated at Posted at 2025-02-15

slang を使用して Flutter アプリをローカライズできます。

  1. pubspec.yamlで準備
dependencies:
  flutter:
    sdk: flutter
  slang: ^3.27.0

dev_dependencies:
  slang_build: ^3.27.0
  build_runner: ^2.4.6
  1. Google Sheets(旧名?: Google スプレッドシート)で準備
key ja en ko zh zh_Hant (備考)
mbtiQuestion MBTI質問 MBTI Question MBTI 질문 MBTI 问题 MBTI 問題
mbtiResult MBTI結果 MBTI Result MBTI 결과 MBTI 结果 MBTI 結果

(備考)みたいにカッコで書けばローカライズ対象外にできる。

右上の「共有」ボタンをリンク知ってる人全員とかにしておく

  1. SlangMateをDL

AndroidStudio持っていたら
https://plugins.jetbrains.com/plugin/26502-slangmate/

  1. 設定する

Tool -> SlangMate -> Open Settings
※多言語対応されているプラグインなので日本語の場合は別です。

ここで、fvmを使っていたらチェック入れます。

https://docs.google.com/spreadsheets/d/hogehogehoge/edit?gid=0#gid=0

なURLの場合は、 hogehogehoge がIDになります。

※URL丸ごと突っ込んだらIDがそのまま入るような修正が今後入るかも?

  1. CSVとしてダウンロード

Tool -> SlangMate -> Download CSV
※多言語対応されているプラグインなので日本語の場合は別です。

これでCSVとして保存されます。

  1. 実行

Run Slang

裏で以下のどちらかが実行される
fvm の仕様の有無で変わる

fvm flutter pub run slang
flutter pub run slang

SlangMateの要望があればコメントあれば、書けば変わっていくと思います。
アイコンSVG画像が変なので直してくれたら幸いですね。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?