![](https://livestylewebsitestorage.blob.core.windows.net/livestylewebsitescontainer/2020/07/blog-chanmi-main.png)
さくっと簡単に、画像から文字列を読み取って、日本語に翻訳してくれるアプリを作成してみました!
今回は、見た目はこらず、本当に最小限の機能で作成しています。というのも、通常業務中にコピペできないエラーが発生して、手っ取り早く翻訳したいという気持ちだけで作成したので、最短で作りました。
本当はもっとちゃんとしたアプリが色んなところから出ていることは知っているのですが、毎回探すの面倒に感じてしまい、それなら作っちゃえって感じです笑
※AI Builder を利用するので、AI Builder のライセンスが必要です。
![](https://livestylewebsitestorage.blob.core.windows.net/livestylewebsitescontainer/2023/08/PowerApps_ImageTranslation_FinishedApp-1024x627.png)
<作成手順>
1.[テキスト認識エンジン]を挿入
![](https://livestylewebsitestorage.blob.core.windows.net/livestylewebsitescontainer/2023/08/PowerApps_ImageTranslation_TAddTextRecognition-744x1024.png)
2.[テキスト ラベル]を挿入
![](https://livestylewebsitestorage.blob.core.windows.net/livestylewebsitescontainer/2023/08/PowerApps_ImageTranslation_AddTextLabel-1024x682.png)
3. [Microsoft Translator]データを接続
![](https://livestylewebsitestorage.blob.core.windows.net/livestylewebsitescontainer/2023/08/PowerApps_ImageTranslation_AddMicrosoftTranslator-1024x690.png)
4.Text=MicrosoftTranslator.Translate(Concat(TextRecognizer1.Results,Text),”ja”)
![](https://livestylewebsitestorage.blob.core.windows.net/livestylewebsitescontainer/2023/08/PowerApps_ImageTranslation_SetTextLabel-1024x579.png)
手順4の関数を少し説明します。
テキスト認識では、各行ごとに分割して認識されます。今回の例では、6行のデータとして認識されています。
Concat()により、分割された文章を1つに結合します。
![](https://livestylewebsitestorage.blob.core.windows.net/livestylewebsitescontainer/2023/08/PowerApps_ImageTranslation_Rows-1024x414.png)
1つに結合した文章を、 MicrosoftTranslator.Translate()により翻訳して表示するように設定してあります。翻訳先の言語は、固定で日本語にしてあります。
たった4Step だけで、読み取った画像から日本語に翻訳するアプリを作成することができました!Power Apps ってすごい…!!