{"id":10387,"date":"2022-05-09T07:00:04","date_gmt":"2022-05-08T22:00:04","guid":{"rendered":"https:\/\/blog.capilano-fw.com\/?p=10387"},"modified":"2023-02-21T16:38:37","modified_gmt":"2023-02-21T07:38:37","slug":"laravel-deepl-%e3%81%a7%e8%87%aa%e5%8b%95%e7%bf%bb%e8%a8%b3%e6%a9%9f%e8%83%bd%e3%82%92%e3%81%a4%e3%81%8f%e3%82%8b","status":"publish","type":"post","link":"https:\/\/blog.capilano-fw.com\/?p=10387","title":{"rendered":"Laravel + DeepL \u3067\u81ea\u52d5\u7ffb\u8a33\u6a5f\u80fd\u3092\u3064\u304f\u308b"},"content":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001\u3053\u308c\u306f\u3053\u3053\u6570\u5e74\u306b\u9650\u3089\u305a\u3067\u3059\u304c\u3001\u30b0\u30ed\u30fc\u30d0\u30eb\u5316\u304c\u9032\u3093\u3060\u3053\u3068\u3067\u6d77\u5916\u306e\u65b9\u3092\u65e5\u672c\u3067\u898b\u304b\u3051\u308b\u3053\u3068\u306f\u73cd\u3057\u304f\u306a\u304f\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u7279\u306b\u30a4\u30f3\u30d0\u30a6\u30f3\u30c9\u9700\u8981\u304c\u9ad8\u307e\u3063\u3066\u3044\u305f\u3068\u304d\u306f\u300c\u65e5\u672c\u306a\u306e\u306b\u65e5\u672c\u8a9e\u304c\u805e\u3053\u3048\u306a\u3044\u300d\u3050\u3089\u3044\u89b3\u5149\u5ba2\u306e\u65b9\u3005\u304c\u3044\u3089\u3063\u3057\u3083\u3063\u3066\u3044\u3066\u3001<strong>\u65e5\u672c\u7d4c\u6e08\u306b\u30d7\u30e9\u30b9\u306b\u306a\u3063\u3066\u3044\u305f\u3053\u3068\u306f\u9593\u9055\u3044\u306a\u3044<\/strong>\u3068\u8a00\u3063\u3066\u3044\u3044\u3067\u3057\u3087\u3046\u3002<\/p>\n<p>\u305d\u3057\u3066\u3001\u73fe\u5728\u306f\u30b3\u30ed\u30ca\u798d\u306b\u3042\u308a\u307e\u3059\u304c\u3001\u6bb5\u968e\u7684\u306b\u7de9\u548c\u3059\u308b\u65b9\u5411\u306b\u306a\u3063\u3066\u3044\u308b\u3088\u3046\u3067\u3059\u306e\u3067\u3001\u4eca\u5f8c\u306f\u307e\u305f\u3042\u308b\u6a5f\u80fd\u304c\u5fc5\u8981\u306b\u306a\u3063\u3066\u304f\u308b\u3093\u3058\u3083\u306a\u3044\u304b\u3068\u8003\u3048\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u305d\u308c\u306f\u30fb\u30fb\u30fb\u30fb\u30fb\u30fb<\/p>\n<p><strong style=\"font-size: 35px;\">\u7ffb\u8a33\u6a5f\u80fd<\/strong><\/p>\n<p>\u3067\u3059\u3002<\/p>\n<p>\u3084\u306f\u308a\u3001\u6bcd\u56fd\u8a9e\u3067\u60c5\u5831\u3092\u5f97\u308b\u3053\u3068\u304c\u4fbf\u5229\u306a\u306e\u306f\u9593\u9055\u3044\u3042\u308a\u307e\u305b\u3093\u3088\u306d\u3002<br \/>\n\u305d\u3057\u3066\u3001\u4e00\u65b9\u3067\u300c\u7ffb\u8a33\u6a5f\u80fd\u300d\u3068\u3057\u3066\u3088\u304f\u805e\u304f\u3088\u3046\u306b\u306a\u3063\u305f\u306e\u304c\u3001<\/p>\n<p><strong style=\"font-size: 35px;\">DeepL\uff08\u3067\u3043\u30fc\u3077\u3048\u308b\uff09<\/strong><\/p>\n<p>\u3067\u3059\u3088\u306d\u3002<\/p>\n<p><a href=\"https:\/\/www.deepl.com\/\" target=\"_blank\" rel=\"noopener\">DeepL<\/a> \u306f\u3068\u3066\u3082\u512a\u79c0\u306a\u7ffb\u8a33\u30b5\u30fc\u30d3\u30b9\u3067\u3001\u4e2d\u306b\u306f\u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092<code>DeepL<\/code>\u3067\u65e5\u672c\u8a9e\u5316\u3057\u3066\u3044\u308b\u4eba\u3082\u591a\u3044\u3093\u3058\u3083\u306a\u3044\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n<p>\u305d\u3053\u3067\u2757<\/p>\n<p>\u4eca\u56de\u306f\u3001<code>DeepL<\/code>\u306e<code>API<\/code>\u3092\u4f7f\u3063\u3066<code>Laravel<\/code>\u306e\u30c6\u30ad\u30b9\u30c8\u7ffb\u8a33\u3092\u3057\u3066\u307f\u307e\u3059\u3002<br \/>\n\u305c\u3072\u4f55\u304b\u306e\u53c2\u8003\u306b\u306a\u308a\u307e\u3057\u305f\u3089\u5b09\u3057\u3044\u3067\u3059\u3002\ud83d\ude04\u2728<\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3405 aligncenter\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/04\/no_18.png\" alt=\"\" width=\"310\" height=\"320\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/04\/no_18.png 310w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/04\/no_18-291x300.png 291w\" sizes=\"auto, (max-width: 310px) 100vw, 310px\" \/>\u300c\u304a\u8179\u306e\u8abf\u5b50\u304c\u60aa\u3044\u306e\u3067\u3001<br \/>\n\u30b9\u30bf\u30f3\u30c7\u30a3\u30f3\u30b0\u958b\u767a\u3092\u8a66\u3057\u4e2d\u30fb\u30fb\u30fb<br \/>\n\uff08\u3069\u3046\u306a\u308b\u304b\u306a\ud83e\udd14\uff09\u300d<\/p>\n<p><strong>\u958b\u767a\u74b0\u5883\uff1a<\/strong> Laravel 9.x<\/p>\n<h1>\u3084\u308a\u305f\u3044\u3053\u3068<\/h1>\n<p>\u4eca\u56de\u3084\u308a\u305f\u3044\u3053\u3068\u306f\u3001\u300c<strong>\u65e5\u672c\u8a9e\u3092\u767b\u9332\u3057\u3066\u304a\u304f\u3068\u3001<code>DeepL<\/code>\u304b\u3089\u7ffb\u8a33\u30c7\u30fc\u30bf\u3092\u3068\u3063\u3066\u304d\u3066\u4fdd\u5b58\u3059\u308b<\/strong>\u300d\u3068\u3044\u3046\u3082\u306e\u3067\u3059\u3002<\/p>\n<p>\uff08<code>cron<\/code>\u3092\u4f7f\u3063\u3066\u5b9a\u671f\u7684\u306b\u5b9f\u884c\u3059\u308b\u3053\u3068\u3092\u60f3\u5b9a\u3057\u3066\u3044\u307e\u3059\uff09<\/p>\n<p>\u306a\u304a\u3001\u4eca\u56de\u306f\u65e5\u672c\u8a9e\u304b\u3089\u7ffb\u8a33\u3059\u308b\u306e\u306f\u300c<strong>\u82f1\u8a9e<\/strong>\u300d\u3068\u300c<strong>\u4e2d\u56fd\u8a9e<\/strong>\u300d\u306e\uff12\u3064\u3067\u3059\u3002<br \/>\n\u3067\u306f\u3001\u4eca\u56de\u3082\u697d\u3057\u3093\u3067\u3084\u3063\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u2757<\/p>\n<p><strong>\u3010\u8ffd\u8a18\uff1a2022.6.1\u3011<\/strong><br \/>\n\u6b8b\u5ff5\u306a\u304c\u3089 2022.6.1 \u73fe\u5728\u3001<del>\u97d3\u56fd\u8a9e\u3068<\/del>\u30d9\u30c8\u30ca\u30e0\u8a9e\u306b\u306f\u5bfe\u5fdc\u3057\u3066\u3044\u306a\u3044\u3088\u3046\u3067\u3059\u3002\u306a\u304a\u3001\u5bfe\u5fdc\u3057\u3066\u3044\u308b\u8a00\u8a9e\u306f<a href=\"https:\/\/www.deepl.com\/en\/docs-api\/other-functions\/listing-supported-languages\/\" target=\"_blank\" rel=\"noopener\">\u3053\u3061\u3089<\/a>\u306e\u300c<strong>Listing supported languages<\/strong>\u300d\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><strong>\u3010\u8ffd\u8a18\uff1a2023.2.21\u3011<\/strong><br \/>\n\u97d3\u56fd\u8a9e\u3068\u30ce\u30eb\u30a6\u30a7\u30fc\u8a9e\u306b\u5bfe\u5fdc\u3057\u305f\u3088\u3046\u3067\u3059\uff01<\/p>\n<h1>DeelL API \u304c\u4f7f\u3048\u308b\u3088\u3046\u306b\u3059\u308b<\/h1>\n<p>\u307e\u305a\u306f<code>DeepL<\/code>\u304c\u4f7f\u3048\u306a\u3044\u3068\u3044\u3051\u307e\u305b\u3093\u306e\u3067\u3001\u30e6\u30fc\u30b6\u30fc\u767b\u9332\u3092\u3057\u307e\u3059\u3002<br \/>\n<a href=\"https:\/\/www.deepl.com\/pro-api?cta=header-pro-api\/\" target=\"_blank\" rel=\"noopener\">\u3053\u3061\u3089\u306e\u30da\u30fc\u30b8<\/a> \u3078\u30a2\u30af\u30bb\u30b9\u3057\u3066\u767b\u9332\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10394\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_deepl_translation_1.png\" alt=\"\" width=\"622\" height=\"292\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_deepl_translation_1.png 622w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_deepl_translation_1-300x141.png 300w\" sizes=\"auto, (max-width: 622px) 100vw, 622px\" \/><\/p>\n<p>\u30da\u30fc\u30b8\u79fb\u52d5\u3057\u305f\u3089\u3001\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3068\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5165\u529b\u3057\u3066\u3001\u300c<strong>Continue<\/strong>\u300d\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10393\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_deepl_translation_2.png\" alt=\"\" width=\"640\" height=\"553\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_deepl_translation_2.png 640w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_deepl_translation_2-300x259.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u305d\u3057\u3066\u3001\u5404\u30e6\u30fc\u30b6\u30fc\u60c5\u5831\u306e\u5165\u529b\u3067\u3059\u3002<br \/>\n\u4ee5\u4e0b\u3092\u53c2\u8003\u306b\u3057\u3066\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<ul>\n<li>Country \u30fb\u30fb\u30fb Japan<\/li>\n<li>Subscribing for a company? \u30fb\u30fb\u30fb \u4f1a\u793e\u3068\u3057\u3066\u306e\u767b\u9332\u3067\u3059\u304b\uff1f\uff08\u30c1\u30a7\u30c3\u30af\u3092\u3044\u308c\u308b\u3068\u4f1a\u793e\u540d\u3092\u5165\u529b\u3059\u308b\u30dc\u30c3\u30af\u30b9\u304c\u8868\u793a\u3055\u308c\u307e\u3059\uff09<\/li>\n<li>Last name \u30fb\u30fb\u30fb \u59d3<\/li>\n<li>First name \u30fb\u30fb\u30fb \u540d<\/li>\n<li>Postal code \u30fb\u30fb\u30fb \u90f5\u4fbf\u756a\u53f7\uff08123-4567 \u306e\u5f62\u5f0f\uff09<\/li>\n<li>Prefecture \u30fb\u30fb\u30fb \u90fd\u9053\u5e9c\u770c<\/li>\n<li>City \u30fb\u30fb\u30fb \u5e02\u533a\u753a\u6751<\/li>\n<li>Address line 1 \u30fb\u30fb\u30fb \u305d\u308c\u4ee5\u964d\u306e\u4f4f\u6240<\/li>\n<li>Address line 2 \u30fb\u30fb\u30fb \u30d3\u30eb\u540d\u306a\u3069\uff08\u4efb\u610f\uff09<\/li>\n<li>Credit card \u30fb\u30fb\u30fb \u30af\u30ec\u30b8\u30c3\u30c8\u30ab\u30fc\u30c9\u756a\u53f7<\/li>\n<\/ul>\n<p>\u203b \u3061\u306a\u307f\u306b\u82f1\u8a9e\u8868\u8a18\u306e\u4f4f\u6240\u304c\u5206\u304b\u3089\u306a\u3044\u5834\u5408\u306f\u3001<strong><a href=\"https:\/\/kimini.jp\/\" target=\"_blank\" rel=\"noopener\">\u541b\u306b\u5c4a\u3051\uff01<\/a><\/strong> \u3068\u3044\u3046\u3068\u3066\u3082\u4fbf\u5229\u306a\u30b5\u30fc\u30d3\u30b9\u304c\u3042\u308b\u306e\u3067\u304a\u3059\u3059\u3081\u3067\u3059\u3002<br \/>\n\u203b \u30af\u30ec\u30b8\u30c3\u30c8\u30ab\u30fc\u30c9\u756a\u53f7\u306e\u6ce8\u610f\u66f8\u304d\u3068\u3057\u3066\u3001\u300c\u91cd\u8907\u3067\u4f7f\u308f\u306a\u3044\u3088\u3046\u306b\u767b\u9332\u3057\u3066\u3082\u3089\u3044\u307e\u3059\u3002\u6709\u6599\u30d0\u30fc\u30b8\u30e7\u30f3\u306b\u3057\u306a\u3044\u9650\u308a\u8ab2\u91d1\u3055\u308c\u307e\u305b\u3093\u300d\u3068\u66f8\u3044\u3066\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u5165\u529b\u3057\u7d42\u308f\u3063\u305f\u3089\u300c<strong>Continue<\/strong>\u300d\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10391\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_deepl_translation_3.png\" alt=\"\" width=\"640\" height=\"1019\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_deepl_translation_3.png 640w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_deepl_translation_3-188x300.png 188w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u79fb\u52d5\u3059\u308b\u3068\u3001\u540c\u610f\u30d5\u30a9\u30fc\u30e0\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<br \/>\n\uff12\u3064\u306e\u30c1\u30a7\u30c3\u30af\u30dc\u30c3\u30af\u30b9\u3092\u30aa\u30f3\u306b\u3057\u3066\u300c<strong>Sign up for free<\/strong>\u300d\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u306a\u304a\u3001\u6982\u8981\u306f\u4ee5\u4e0b\u306e\u3068\u304a\u308a\u3067\u3059\u3002\uff08\u8d85\u610f\u8a33\u3067\u3059\uff09<\/p>\n<ul>\n<li>\u300c\u898f\u7d04\u306b\u540c\u610f\u3057\u307e\u3059\ud83d\udc4d\u300d<\/li>\n<li>\u300c\u7ffb\u8a33\u3092\u4f7f\u3063\u3066\u30b5\u30a4\u30c8\u304c\u304a\u304b\u3057\u304f\u306a\u3063\u3066\u3082\u6587\u53e5\u306f\u8a00\u3044\u307e\u305b\u3093\ud83d\udc4d\u300d<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10392\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_deepl_translation_4.png\" alt=\"\" width=\"677\" height=\"661\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_deepl_translation_4.png 677w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_deepl_translation_4-300x293.png 300w\" sizes=\"auto, (max-width: 677px) 100vw, 677px\" \/><\/p>\n<p>\u30da\u30fc\u30b8\u79fb\u52d5\u3059\u308b\u3068\u3001\u767b\u9332\u5b8c\u4e86\u753b\u9762\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<br \/>\n\u6b21\u306fAPI \u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u305f\u3081\u306e\u300c<strong>\u30ad\u30fc<\/strong>\u300d\u3092\u53d6\u5f97\u3059\u308b\u305f\u3081\u306b\u4ee5\u4e0b\u306e\u30ea\u30f3\u30af\u3078\u79fb\u52d5\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u203b \u306a\u304a\u3001\u30da\u30fc\u30b8\u4e0b\u90e8\u306b\u306f\u300c\u767b\u9332\u756a\u53f7\u3092\u63a7\u3048\u3066\u304a\u3044\u3066\u304f\u3060\u3055\u3044\u300d\u3068\u66f8\u304b\u308c\u3066\u3044\u307e\u3059\u3002\uff08\u3053\u306e\u756a\u53f7\u306f\u3001\u767b\u9332\u5b8c\u4e86\u30e1\u30fc\u30eb\u306b\u3082\u8a18\u8f09\u3055\u308c\u3066\u3044\u307e\u3059\uff09<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10390\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_deepl_translation_5.png\" alt=\"\" width=\"640\" height=\"645\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_deepl_translation_5.png 640w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_deepl_translation_5-298x300.png 298w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_deepl_translation_5-150x150.png 150w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_deepl_translation_5-100x100.png 100w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u79fb\u52d5\u3057\u305f\u3089\u3001\u3055\u3089\u306b\u30a2\u30ab\u30a6\u30f3\u30c8\u30da\u30fc\u30b8\u3078\u79fb\u52d5\u3057\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10389\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_deepl_translation_6.png\" alt=\"\" width=\"640\" height=\"183\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_deepl_translation_6.png 640w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_deepl_translation_6-300x86.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u3059\u308b\u3068\u3001\u30da\u30fc\u30b8\u4e0b\u306e\u65b9\u306b\u300c<strong>Authentication Key for DeepL API<\/strong>\u300d\u3068\u3044\u3046\u9805\u76ee\u304c\u3042\u308b\u306e\u3067\u3001\u3053\u308c\u3092\u30b3\u30d4\u30fc\uff06\u30da\u30fc\u30b9\u30c8\u3057\u3066<code>Laravel<\/code>\u306e<code>.env<\/code>\u3078\u8a18\u8f09\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10388\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_deepl_translation_7.png\" alt=\"\" width=\"601\" height=\"301\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_deepl_translation_7.png 601w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_deepl_translation_7-300x150.png 300w\" sizes=\"auto, (max-width: 601px) 100vw, 601px\" \/><\/p>\n<p><strong>.env<\/strong><\/p>\n<pre># \u7701\u7565<strong>\r\n\r\nDEEPL_AUTH_KEY=********************************<\/strong><\/pre>\n<p>\u3053\u308c\u3067<code>DeepL<\/code>\u306e\u8a2d\u5b9a\u306f\u5b8c\u4e86\u3057\u307e\u3057\u305f\uff01<br \/>\n\u7d9a\u3044\u3066<code>Laravel<\/code>\u5074\u306e\u4f5c\u696d\u3078\u79fb\u884c\u3057\u307e\u3057\u3087\u3046\ud83d\udc4d<\/p>\n<h1>\u7ffb\u8a33\u30c7\u30fc\u30bf\u3092\u7ba1\u7406\u3059\u308b\u30e2\u30c7\u30eb\uff06\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u3092\u3064\u304f\u308b<\/h1>\n<p>\u3067\u306f\u3001\u4eca\u56de\u306f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u4f7f\u3063\u3066\u7ffb\u8a33\u30c7\u30fc\u30bf\u3092\u7ba1\u7406\u3057\u307e\u3059\u306e\u3067\u3001\u30e2\u30c7\u30eb\u3068\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u3092\u300c\uff12\u30da\u30a2\u300d\u4f5c\u308a\u307e\u3059\u3002<\/p>\n<p>\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre><strong>php artisan make:model Translation -m<\/strong><\/pre>\n<pre><strong>php artisan make:model TranslationItem -m<\/strong><\/pre>\n<p><strong>\u3010\u8ffd\u8a18\uff1a2022.5.11\u3011<\/strong>\u8a2a\u554f\u30e6\u30fc\u30b6\u30fc\u3055\u307e\u304b\u3089\u3054\u6307\u6458\u3092\u3044\u305f\u3060\u304d\u307e\u3057\u3066\u300cpph \u2192 php\u300d\u3078\u4fee\u6b63\u3057\u307e\u3057\u305f\u3002\u307f\u306a\u3055\u3093\u3001\u3044\u3064\u3082\u3042\u308a\u304c\u3068\u3046\u3054\u3056\u3044\u307e\u3059\uff01<\/p>\n<p>\u3059\u308b\u3068\u3001\u30e2\u30c7\u30eb\u3068\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u306e\uff12\u30d5\u30a1\u30a4\u30eb\u304c\u4f5c\u6210\u3055\u308c\u308b\u306e\u3067\u3001\u4e2d\u8eab\u3092\u305d\u308c\u305e\u308c\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5909\u66f4\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><strong>app\/Models\/Translation.php<\/strong><\/p>\n<pre><strong>&lt;?php<\/strong>\r\n\r\n<strong>namespace App\\Models;<\/strong>\r\n\r\n<strong>use Illuminate\\Database\\Eloquent\\Factories\\HasFactory;<\/strong>\r\n<strong>use Illuminate\\Database\\Eloquent\\Model;<\/strong>\r\n\r\n<strong>class Translation extends Model<\/strong>\r\n<strong>{<\/strong>\r\n<strong>    use HasFactory;<\/strong>\r\n\r\n<strong>    const LOCALES = [ \/\/ \u30b5\u30dd\u30fc\u30c8\u3059\u308b\u8a00\u8a9e<\/strong>\r\n<strong>        'ja', \/\/ \u65e5\u672c\u8a9e<\/strong>\r\n<strong>        'en', \/\/ \u82f1\u8a9e<\/strong>\r\n<strong>        'zh', \/\/ \u4e2d\u56fd\u8a9e<\/strong>\r\n<strong>    ];<\/strong>\r\n\r\n<strong>    \/\/ Relationship<\/strong>\r\n<strong>    public function items()<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        return $this-&gt;hasMany(TranslationItem::class, 'translation_id', 'id');<\/strong>\r\n<strong>    }<\/strong>\r\n\r\n<strong>    \/\/ Others<\/strong>\r\n<strong>    public static function getConfigData($locale) \/\/ \u7ffb\u8a33\u30c7\u30fc\u30bf\u3092 key =&gt; value \u5f62\u5f0f\u306b\u3057\u3066\u53d6\u5f97<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        $translations = Translation::whereHas('items', function($query) use($locale) {<\/strong>\r\n\r\n<strong>            $query-&gt;where('locale', $locale);<\/strong>\r\n\r\n<strong>        })<\/strong>\r\n<strong>        -&gt;get();<\/strong>\r\n\r\n<strong>        return $translations-&gt;map(function($translation) use($locale) {<\/strong>\r\n\r\n<strong>           return [<\/strong>\r\n<strong>               'key' =&gt; $translation-&gt;key,<\/strong>\r\n<strong>               'text' =&gt; $translation-&gt;items<\/strong>\r\n<strong>                   -&gt;firstWhere('locale', $locale)<\/strong>\r\n<strong>                   -&gt;text<\/strong>\r\n<strong>           ];<\/strong>\r\n\r\n<strong>        })<\/strong>\r\n<strong>        -&gt;pluck('text', 'key');<\/strong>\r\n<strong>    }<\/strong>\r\n<strong>}<\/strong><\/pre>\n<p>\u203b <code>TranslationItem.php<\/code>\u306f\u305d\u306e\u307e\u307e\u3067 OK \u3067\u3059\u3002<\/p>\n<p><strong>database\/migrations\/****_**_**_******_create_translations_table.php<\/strong><\/p>\n<pre>\/\/ \u7701\u7565\r\n\r\n<strong>public function up()<\/strong>\r\n<strong>{<\/strong>\r\n<strong>    Schema::create('translations', function (Blueprint $table) {<\/strong>\r\n<strong>        $table-&gt;id();<\/strong>\r\n<strong>        $table-&gt;string('key')-&gt;comment('\u7ffb\u8a33\u30ad\u30fc');<\/strong>\r\n<strong>        $table-&gt;timestamps();<\/strong>\r\n\r\n<strong>        $table-&gt;unique('key');<\/strong>\r\n<strong>    });<\/strong>\r\n<strong>}<\/strong>\r\n\r\n<strong>public function down()<\/strong>\r\n<strong>{<\/strong>\r\n<strong>    Schema::dropIfExists('translations');<\/strong>\r\n<strong>}<\/strong>\r\n\r\n\/\/ \u7701\u7565<\/pre>\n<p><strong>database\/migrations\/****_**_**_******_create_translation_items_table.php<\/strong><\/p>\n<pre>\/\/ \u7701\u7565\r\n\r\n<strong>public function up()<\/strong>\r\n<strong>{<\/strong>\r\n<strong>    Schema::create('translation_items', function (Blueprint $table) {<\/strong>\r\n<strong>        $table-&gt;id();<\/strong>\r\n<strong>        $table-&gt;unsignedBigInteger('translation_id')-&gt;comment('\u7ffb\u8a33ID');<\/strong>\r\n<strong>        $table-&gt;string('locale')-&gt;comment('\u8a00\u8a9e'); \/\/ 2\u6587\u5b57\u306e\u30b3\u30fc\u30c9<\/strong>\r\n<strong>        $table-&gt;text('text')-&gt;nullable()-&gt;comment('\u30c6\u30ad\u30b9\u30c8');<\/strong>\r\n<strong>        $table-&gt;timestamps();<\/strong>\r\n\r\n<strong>        $table-&gt;unique(['translation_id', 'locale']);<\/strong>\r\n<strong>        $table-&gt;foreign('translation_id')-&gt;references('id')-&gt;on('translations')-&gt;onDelete('cascade');<\/strong>\r\n<strong>    });<\/strong>\r\n<strong>}<\/strong>\r\n\r\n<strong>public function down()<\/strong>\r\n<strong>{<\/strong>\r\n<strong>    Schema::dropIfExists('translation_items');<\/strong>\r\n<strong>}<\/strong>\r\n\r\n\/\/ \u7701\u7565<\/pre>\n<h1>\u30c6\u30b9\u30c8\u30c7\u30fc\u30bf\u3092\u3064\u304f\u308b<\/h1>\n<p>\u7d9a\u3044\u3066\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304c\u7a7a\u306e\u307e\u307e\u3067\u306f\u7ffb\u8a33\u304c\u3067\u304d\u307e\u305b\u3093\u306e\u3067\u3001<code>Seeder<\/code>\u3092\u4f7f\u3063\u3066\u3044\u304f\u3064\u304b\u30c6\u30b9\u30c8\u30c7\u30fc\u30bf\u3092\u7528\u610f\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<p>\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre><strong>php artisan make:seed TranslationSeeder<\/strong><\/pre>\n<p>\u3059\u308b\u3068\u3001<code>Seeder<\/code>\u30d5\u30a1\u30a4\u30eb\u304c\u4f5c\u6210\u3055\u308c\u308b\u306e\u3067\u3001\u4e2d\u8eab\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5909\u66f4\u3057\u307e\u3059\u3002<\/p>\n<p><strong>database\/seeders\/TranslationSeeder.php<\/strong><\/p>\n<pre>&lt;?php\r\n\r\nnamespace Database\\Seeders;\r\n\r\nuse App\\Models\\Translation;\r\nuse App\\Models\\TranslationItem;\r\nuse Illuminate\\Database\\Console\\Seeds\\WithoutModelEvents;\r\nuse Illuminate\\Database\\Seeder;\r\n\r\nclass TranslationSeeder extends Seeder\r\n{\r\n    \/**\r\n     * Run the database seeds.\r\n     *\r\n     * @return void\r\n     *\/\r\n    <strong>public function run()<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        $jp_texts = [<\/strong>\r\n<strong>            'login' =&gt; '\u30ed\u30b0\u30a4\u30f3',<\/strong>\r\n<strong>            'logout' =&gt; '\u30ed\u30b0\u30a2\u30a6\u30c8',<\/strong>\r\n<strong>            'sign_up' =&gt; '\u30e6\u30fc\u30b6\u30fc\u767b\u9332',<\/strong>\r\n<strong>            'contact' =&gt; '\u304a\u554f\u3044\u5408\u308f\u305b',<\/strong>\r\n<strong>            'to_password_reminder' =&gt; '\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5fd8\u308c\u307e\u3057\u305f\u304b\uff1f'<\/strong>\r\n<strong>        ];<\/strong>\r\n\r\n<strong>        foreach($jp_texts as $key =&gt; $text) {<\/strong>\r\n\r\n<strong>            $translation = new Translation();<\/strong>\r\n<strong>            $translation-&gt;key = $key;<\/strong>\r\n<strong>            $translation-&gt;save();<\/strong>\r\n\r\n<strong>            $translation_item = new TranslationItem();<\/strong>\r\n<strong>            $translation_item-&gt;translation_id = $translation-&gt;id;<\/strong>\r\n<strong>            $translation_item-&gt;locale = 'ja';<\/strong>\r\n<strong>            $translation_item-&gt;text = $text;<\/strong>\r\n<strong>            $translation_item-&gt;save();<\/strong>\r\n\r\n<strong>        }<\/strong>\r\n<strong>    }<\/strong>\r\n}<\/pre>\n<p><code>Seeder<\/code>\u306f\u4f5c\u6210\u3057\u305f\u3060\u3051\u3067\u306f\u6709\u52b9\u306b\u306a\u308a\u307e\u305b\u3093\u306e\u3067\u3001<code>DatabaseSeeder.php<\/code>\u3078\u767b\u9332\u3057\u307e\u3059\u3002<\/p>\n<p><strong>database\/seeders\/DatabaseSeeder.php<\/strong><\/p>\n<pre>&lt;?php\r\n\r\nnamespace Database\\Seeders;\r\n\r\nuse Illuminate\\Database\\Console\\Seeds\\WithoutModelEvents;\r\nuse Illuminate\\Database\\Seeder;\r\n\r\nclass DatabaseSeeder extends Seeder\r\n{\r\n    public function run()\r\n    {\r\n        \/\/ \\App\\Models\\User::factory(10)-&gt;create();\r\n\r\n       <strong> $this-&gt;call(TranslationSeeder::class); \/\/ \ud83d\udc48 \u3053\u3053\u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f<\/strong>\r\n    }\r\n}<\/pre>\n<p>\u3067\u306f\u3001\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u3092\u5b9f\u884c\u3057\u3066\u30c6\u30fc\u30d6\u30eb\u3092\u4f5c\u6210\u3057\u307e\u3057\u3087\u3046\u3002<br \/>\n\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre><b>php artisan migrate:fresh --seed<\/b><\/pre>\n<p>\u3059\u308b\u3068\u3001\u5b9f\u969b\u306e\u30c6\u30fc\u30d6\u30eb\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10398\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_deepl_translation_8.png\" alt=\"\" width=\"601\" height=\"374\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_deepl_translation_8.png 601w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_deepl_translation_8-300x187.png 300w\" sizes=\"auto, (max-width: 601px) 100vw, 601px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10399\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_deepl_translation_9.png\" alt=\"\" width=\"571\" height=\"375\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_deepl_translation_9.png 571w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_deepl_translation_9-300x197.png 300w\" sizes=\"auto, (max-width: 571px) 100vw, 571px\" \/><\/p>\n<h1>DeepL\u3067 \u81ea\u52d5\u7ffb\u8a33\u3059\u308b Artisan \u30b3\u30de\u30f3\u30c9\u3092\u3064\u304f\u308b<\/h1>\n<p>\u3067\u306f\u3001<code>DeepL<\/code>\u306e<code>API<\/code>\u3067\u7ffb\u8a33\u3059\u308b\u90e8\u5206\u3067\u3059\u3002<\/p>\n<p>\u7ffb\u8a33\u306f\u3001<code>Laravel<\/code>\u306e\u30b3\u30de\u30f3\u30c9\uff08<code>Artisan<\/code>\u30b3\u30de\u30f3\u30c9\uff09\u3092\u3064\u304f\u3063\u3066\u3001\u305d\u308c\u3092\u4f55\u5ea6\u3082\u30bf\u30a4\u30de\u30fc\u5b9f\u884c\u3059\u308b\u3053\u3068\u3067\u3001\u3072\u3068\u3064\u305a\u3064\u81ea\u52d5\u3067\u7ffb\u8a33\u3092\u9032\u3081\u308b\u5f62\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u3067\u306f\u3001\u7ffb\u8a33\u7528\u306e\u30b3\u30de\u30f3\u30c9\u3092\u3064\u304f\u308a\u307e\u3059\u3002<br \/>\n\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre><strong>php artisan make:command TranslationCommand<\/strong><\/pre>\n<p>\u3059\u308b\u3068\u3001\u30d5\u30a1\u30a4\u30eb\u304c\u4f5c\u6210\u3055\u308c\u308b\u306e\u3067\u3001\u4e2d\u8eab\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5909\u66f4\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><strong>app\/Console\/Commands\/TranslationCommand.php<\/strong><\/p>\n<pre>&lt;?php\r\n\r\nnamespace App\\Console\\Commands;\r\n\r\n<strong>use App\\Models\\Translation;<\/strong>\r\n<strong>use App\\Models\\TranslationItem;<\/strong>\r\nuse Illuminate\\Console\\Command;\r\n<strong>use Illuminate\\Support\\Arr;<\/strong>\r\n<strong>use Illuminate\\Support\\Facades\\Http;<\/strong>\r\n\r\nclass TranslationCommand extends Command\r\n{\r\n    <strong>private $from_locale = ''; \/\/ \u7ffb\u8a33\u5143\u306e\u8a00\u8a9e<\/strong>\r\n<strong>    private $to_locales = []; \/\/ \u7ffb\u8a33\u5148\u306e\u8a00\u8a9e<\/strong>\r\n\r\n<strong>    \/**<\/strong>\r\n<strong>     * The name and signature of the console command.<\/strong>\r\n<strong>     *<\/strong>\r\n<strong>     * @var string<\/strong>\r\n<strong>     *\/<\/strong>\r\n<strong>    protected $signature = 'translate {--from=ja : The language to translate from}';<\/strong>\r\n\r\n<strong>    \/**<\/strong>\r\n<strong>     * The console command description.<\/strong>\r\n<strong>     *<\/strong>\r\n<strong>     * @var string<\/strong>\r\n<strong>     *\/<\/strong>\r\n<strong>    protected $description = 'Translate text through DeepL';<\/strong>\r\n\r\n<strong>    \/**<\/strong>\r\n<strong>     * Execute the console command.<\/strong>\r\n<strong>     *<\/strong>\r\n<strong>     * @return int<\/strong>\r\n<strong>     *\/<\/strong>\r\n<strong>    public function handle()<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        $all_locales = Translation::LOCALES;<\/strong>\r\n<strong>        $this-&gt;from_locale = $this-&gt;option('from');<\/strong>\r\n<strong>        $this-&gt;to_locales = Arr::except($all_locales, [$this-&gt;from_locale]); \/\/ \u5143\u8a00\u8a9e\u3092\u9664\u5916\u3057\u305f\u8a00\u8a9e<\/strong>\r\n\r\n<strong>        if(!in_array($this-&gt;from_locale, $all_locales, true)) { \/\/ \u8a00\u8a9e\u304c\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u306a\u3044\u5834\u5408<\/strong>\r\n\r\n<strong>            return Command::INVALID;<\/strong>\r\n\r\n<strong>        }<\/strong>\r\n\r\n<strong>        $translation = $this-&gt;getTranslation();<\/strong>\r\n\r\n<strong>        if(is_null($translation)) {<\/strong>\r\n\r\n<strong>            $this-&gt;info('Nothing to translate.');<\/strong>\r\n<strong>            return Command::SUCCESS; \/\/ \u7ffb\u8a33\u3059\u3079\u304d\u30c7\u30fc\u30bf\u304c\u306a\u3044\u5834\u5408\u306f\u7d42\u4e86<\/strong>\r\n\r\n<strong>        }<\/strong>\r\n\r\n<strong>        foreach ($this-&gt;to_locales as $to_locale) {<\/strong>\r\n\r\n<strong>            $translation_item = $translation-&gt;items-&gt;where('locale', $to_locale)-&gt;first();<\/strong>\r\n\r\n<strong>            if(is_null($translation_item)) { \/\/ \u7ffb\u8a33\u5148\u306e\u8a00\u8a9e\u304c\u5b58\u5728\u3057\u306a\u3044\u5834\u5408<\/strong>\r\n\r\n<strong>                $this-&gt;translate($translation, $to_locale);<\/strong>\r\n\r\n<strong>            }<\/strong>\r\n\r\n<strong>        }<\/strong>\r\n\r\n<strong>        return Command::SUCCESS;<\/strong>\r\n<strong>    }<\/strong>\r\n\r\n<strong>    private function getTranslation()<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        return Translation::query()<\/strong>\r\n<strong>            -&gt;with('items')<\/strong>\r\n<strong>            -&gt;whereHas('items', function($query) {<\/strong>\r\n\r\n<strong>                $query-&gt;where('locale', $this-&gt;from_locale); \/\/ \u5143\u8a00\u8a9e\u304c\u5b58\u5728\u3057\u3066\u3044\u3066\u3001<\/strong>\r\n\r\n<strong>            })<\/strong>\r\n<strong>            -&gt;where(function($query) {<\/strong>\r\n\r\n<strong>                foreach($this-&gt;to_locales as $to_locale) {<\/strong>\r\n\r\n<strong>                    $query-&gt;orWhereDoesntHave('items', function($q) use ($to_locale) {<\/strong>\r\n\r\n<strong>                        $q-&gt;where('locale', $to_locale); \/\/ \u4ed6\u8a00\u8a9e\u304c\u5b58\u5728\u3057\u306a\u3044\u3082\u306e<\/strong>\r\n\r\n<strong>                    });<\/strong>\r\n\r\n<strong>                }<\/strong>\r\n\r\n<strong>            })<\/strong>\r\n<strong>            -&gt;first();<\/strong>\r\n<strong>    }<\/strong>\r\n\r\n<strong>    private function translate(Translation $translation, $to_locale)<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        $from_text = $translation-&gt;items<\/strong>\r\n<strong>            -&gt;firstWhere('locale', $this-&gt;from_locale)<\/strong>\r\n<strong>            -&gt;text; \/\/ \u7ffb\u8a33\u5143\u306e\u30c6\u30ad\u30b9\u30c8<\/strong>\r\n\r\n<strong>        $url = 'https:\/\/api-free.deepl.com\/v2\/translate';<\/strong>\r\n<strong>        $params = [<\/strong>\r\n<strong>            'auth_key' =&gt; env('DEEPL_AUTH_KEY'), \/\/ \u672c\u6765\u306f config\/services.php \u306a\u3069\u306b\u30bb\u30c3\u30c8\u3059\u3079\u304d\u3067\u3059<\/strong>\r\n<strong>            'text' =&gt; $from_text,<\/strong>\r\n<strong>            'source_lang' =&gt; $this-&gt;from_locale,<\/strong>\r\n<strong>            'target_lang' =&gt; $to_locale,<\/strong>\r\n<strong>        ];<\/strong>\r\n<strong>        $response = Http::get($url, $params);<\/strong>\r\n\r\n<strong>        if($response-&gt;ok()) {<\/strong>\r\n\r\n<strong>            $response_data = $response-&gt;json();<\/strong>\r\n<strong>            $translated_text = Arr::get($response_data, 'translations.0.text'); \/\/ \u306a\u3044\u5834\u5408\u306f null \u304c\u8fd4\u3055\u308c\u308b<\/strong>\r\n\r\n<strong>            $translation_item = new TranslationItem();<\/strong>\r\n<strong>            $translation_item-&gt;translation_id = $translation-&gt;id;<\/strong>\r\n<strong>            $translation_item-&gt;locale = $to_locale;<\/strong>\r\n<strong>            $translation_item-&gt;text = $translated_text;<\/strong>\r\n<strong>            $translation_item-&gt;save();<\/strong>\r\n\r\n<strong>            $this-&gt;info('Translated to '. $to_locale .': \"'. $from_text .'\" -&gt; \"'. $translated_text .'\"');<\/strong>\r\n\r\n<strong>        } else {<\/strong>\r\n\r\n<strong>            $this-&gt;error('Oh, something went wrong...');<\/strong>\r\n\r\n<strong>        }<\/strong>\r\n\r\n<strong>    }<\/strong>\r\n}<\/pre>\n<p>\u5c11\u3057\u30b3\u30fc\u30c9\u91cf\u304c\u591a\u3044\u3067\u3059\u304c\u3001\u4e2d\u8eab\u3068\u3057\u3066\u306f\u300c<strong>\u7ffb\u8a33\u30c7\u30fc\u30bf\u304c\u5b58\u5728\u3057\u3066\u3044\u306a\u3044\u30c7\u30fc\u30bf<\/strong>\u300d\u3092\u53d6\u5f97\u3057\u3001<code>DeepL<\/code>\u3067\u7ffb\u8a33\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\uff06\u4fdd\u5b58\u3057\u3066\u3044\u308b\u3060\u3051\u3067\u3059\u3002<\/p>\n<p>\u3053\u308c\u3067\u3001\u30b3\u30de\u30f3\u30c9\u304c\u5b8c\u6210\u3057\u307e\u3057\u305f\uff01\uff08\u3061\u306a\u307f\u306b\u30b3\u30de\u30f3\u30c9\u306f\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3059\u308b\u3060\u3051\u3067<code>Laravel<\/code>\u5074\u3078\u767b\u9332\u3055\u308c\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u3093\u3067\u3059\u306d\u3002\u4fbf\u5229 \ud83d\ude04\ud83d\udc4d\uff09<\/p>\n<h1>\u7ffb\u8a33\u6e08\u307f\u30c7\u30fc\u30bf\u304c\u9069\u7528\u3055\u308c\u308b\u3088\u3046\u306b\u3059\u308b<\/h1>\n<p>\u3067\u306f\u3001\u6700\u5f8c\u306b<code>DeepL<\/code>\u3092\u4f7f\u3063\u3066\u7ffb\u8a33\u3057\u305f\u30c7\u30fc\u30bf\u3092<code>Laravel<\/code>\u306e\u30d8\u30eb\u30d1\u30fc\u95a2\u6570<code>trans()<\/code>\u3067\u4f7f\u3048\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n<p>\u3068\u3044\u3063\u3066\u3082\u3001<code>Laravel<\/code>\u306e\u6a5f\u80fd\u3092\u5fdc\u7528\u3059\u308b\u3060\u3051\u3067\u3059\u306e\u3067\u3001\u5404\u8a00\u8a9e\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u7528\u610f\u3059\u308b\u3060\u3051\u3067OK\u3067\u3059\u3002<\/p>\n<p><strong>lang\/ja\/deepl.php<\/strong><\/p>\n<pre><strong>&lt;?php<\/strong>\r\n\r\n<strong>use App\\Models\\Translation;<\/strong>\r\n\r\n<strong>return Translation::getConfigData('ja');<\/strong><\/pre>\n<p><strong>lang\/en\/deepl.php<\/strong><\/p>\n<pre><strong>&lt;?php<\/strong>\r\n\r\n<strong>use App\\Models\\Translation;<\/strong>\r\n\r\n<strong>return Translation::getConfigData('en');<\/strong><\/pre>\n<p><strong>lang\/zh\/deepl.php<\/strong><\/p>\n<pre><strong>&lt;?php<\/strong>\r\n\r\n<strong>use App\\Models\\Translation;<\/strong>\r\n\r\n<strong>return Translation::getConfigData('zh');<\/strong><\/pre>\n<p>\u203b \u3061\u306a\u307f\u306b\u8aad\u307f\u8fbc\u307f\u3092\u65e9\u304f\u3059\u308b\u305f\u3081\u306b\u306f\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u7528\u610f\u3059\u308b\u3068\u3044\u3044\u3067\u3057\u3087\u3046\u3002<\/p>\n<p>\u3053\u308c\u3067\u4f5c\u696d\u306f\u5b8c\u4e86\u3067\u3059\uff01<br \/>\n\u304a\u75b2\u308c\u69d8\u3067\u3057\u305f\ud83d\ude04\u2728<\/p>\n<h1>\u30c6\u30b9\u30c8\u3057\u3066\u307f\u308b<\/h1>\n<p>\u3067\u306f\u3001\u5b9f\u969b\u306b\u30c6\u30b9\u30c8\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u2757<\/p>\n<p>\u307e\u305a\u306f\u3001<code>DeepL<\/code>\u304b\u3089\u7ffb\u8a33\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3057\u3066\u4fdd\u5b58\u3059\u308b\u90e8\u5206\u3067\u3059\u3002<br \/>\n\u307e\u3060\u65e5\u672c\u8a9e\u4ee5\u5916\u306e\u7ffb\u8a33\u304c\u5b58\u5728\u3057\u3066\u3044\u306a\u3044\u306e\u3092\u78ba\u8a8d\u3057\u3066\u30fb\u30fb\u30fb\u30fb\u30fb\u30fb<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10399\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_deepl_translation_9.png\" alt=\"\" width=\"571\" height=\"375\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_deepl_translation_9.png 571w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_deepl_translation_9-300x197.png 300w\" sizes=\"auto, (max-width: 571px) 100vw, 571px\" \/><\/p>\n<p>\u5148\u307b\u3069\u4f5c\u6210\u3057\u305f\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n<pre><strong>php artisan translate<\/strong><\/pre>\n<p>\u3059\u308b\u3068\u30fb\u30fb\u30fb\u30fb\u30fb\u30fb<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10400\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_deepl_translation_10.png\" alt=\"\" width=\"375\" height=\"54\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_deepl_translation_10.png 375w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_deepl_translation_10-300x43.png 300w\" sizes=\"auto, (max-width: 375px) 100vw, 375px\" \/><\/p>\n<p>\u306f\u3044\u2757<br \/>\n\u82f1\u8a9e\uff06\u4e2d\u56fd\u8a9e\u306e\u7ffb\u8a33\u30c7\u30fc\u30bf\u304c\u53d6\u5f97\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n<p>\u3067\u306f\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u65b9\u3082\u78ba\u8a8d\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10401\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_deepl_translation_11.png\" alt=\"\" width=\"545\" height=\"227\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_deepl_translation_11.png 545w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_deepl_translation_11-300x125.png 300w\" sizes=\"auto, (max-width: 545px) 100vw, 545px\" \/><\/p>\n<p>\u306f\u3044\u2757<br \/>\n\u3046\u307e\u304f\u4fdd\u5b58\u3082\u3067\u304d\u3066\u3044\u308b\u3088\u3046\u3067\u3059\u306d\u3002<\/p>\n<p>\u3042\u3068\u306f\u3001\u4f55\u56de\u304b\u3053\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3068\u30fb\u30fb\u30fb\u30fb\u30fb\u30fb<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10402\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_deepl_translation_12.png\" alt=\"\" width=\"487\" height=\"424\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_deepl_translation_12.png 487w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_deepl_translation_12-300x261.png 300w\" sizes=\"auto, (max-width: 487px) 100vw, 487px\" \/><\/p>\n<p>\u306f\u3044\u2757<br \/>\n\u65e5\u672c\u8a9e\u3067\u767b\u9332\u3057\u305f\u5168\u3066\u306e\u7ffb\u8a33\u30c7\u30fc\u30bf\u3092\u3064\u304f\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n<p>\u6210\u529f\u3067\u3059\ud83d\ude04\u2728<\/p>\n<p>\u3067\u306f\u3001\u5b9f\u969b\u306b\u7ffb\u8a33\u30c7\u30fc\u30bf\u304c\u5207\u308a\u66ff\u308f\u308b\u306e\u304b\u3069\u3046\u304b\u306e\u30c1\u30a7\u30c3\u30af\u3082\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u30eb\u30fc\u30c8\u3092\u3064\u304f\u308a\u307e\u3059\u3002<\/p>\n<p><strong>routes\/web.php<\/strong><\/p>\n<pre>\/\/ \u7701\u7565\r\n\r\n<strong>Route::get('translation', function(){<\/strong>\r\n\r\n<strong>    echo trans('deepl.to_password_reminder');<\/strong>\r\n\r\n<strong>});<\/strong><\/pre>\n<p>\u305d\u3057\u3066\u3001\u307e\u305a\u8a00\u8a9e\u3092\u65e5\u672c\u8a9e\u306b\u30bb\u30c3\u30c8\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><strong>config\/app.php<\/strong><\/p>\n<pre>\/\/ \u7701\u7565\r\n\r\n'locale' =&gt; '<strong>ja<\/strong>',\r\n\r\n\/\/ \u7701\u7565<\/pre>\n<p>\u3053\u308c\u3067\u3001\u300c<strong>https:\/\/******\/translation<\/strong>\u300d\u3078\u30a2\u30af\u30bb\u30b9\u3057\u307e\u3059\u3002<\/p>\n<p>\u3069\u3046\u306a\u308b\u3067\u3057\u3087\u3046\u304b\u30fb\u30fb\u30fb\u30fb\u30fb\u30fb<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10403\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_deepl_translation_13.png\" alt=\"\" width=\"243\" height=\"44\" \/><\/p>\n<p>\u3046\u307e\u304f\u65e5\u672c\u8a9e\u3067\u8868\u793a\u3055\u308c\u307e\u3057\u305f\u3002<br \/>\n\u3067\u306f\u3001\u6b8b\u308a\u306e\u8a00\u8a9e\u3082\u78ba\u8a8d\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10404\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_deepl_translation_14.png\" alt=\"\" width=\"200\" height=\"46\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10405\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_deepl_translation_15.png\" alt=\"\" width=\"102\" height=\"43\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_deepl_translation_15.png 102w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_deepl_translation_15-100x43.png 100w\" sizes=\"auto, (max-width: 102px) 100vw, 102px\" \/><\/p>\n<p>\u306f\u3044\u2757<br \/>\n\u82f1\u8a9e\u30fb\u4e2d\u56fd\u8a9e\u3068\u3082\u306b\u3046\u307e\u304f\u8868\u793a\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n<p>\u3059\u3079\u3066\u6210\u529f\u3067\u3059\ud83d\ude04\u2728<\/p>\n<h1>\u8ffd\u8a18\uff1a\u7ffb\u8a33\u30c7\u30fc\u30bf\u3092\u8ffd\u52a0\u3059\u308b\u30b3\u30de\u30f3\u30c9<\/h1>\n<p><strong>\u3010\u8ffd\u8a18\uff1a2022.6.1\u3011<\/strong><\/p>\n<p>\u5b9f\u969b\u306b\u500b\u4eba\u30b5\u30a4\u30c8\u3067\u7ffb\u8a33\u3092\u3057\u3066\u3044\u3066DB\u306b\u7ffb\u8a33\u30c7\u30fc\u30bf\u3092\u8ffd\u52a0\u3059\u308b\u306e\u306f\u300c\u3061\u3087\u3063\u3068\u3081\u3093\u3069\u3046\u3060\u306a\u300d\u3068\u611f\u3058\u305f\u306e\u3067\u3001\u30b3\u30de\u30f3\u30c9\u3067\u767b\u9332\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<p><strong>app\/Console\/Commands\/MakeTranslation.php<\/strong><\/p>\n<pre><strong>&lt;?php<\/strong>\r\n\r\n<strong>namespace App\\Console\\Commands;<\/strong>\r\n\r\n<strong>use App\\Models\\Translation;<\/strong>\r\n<strong>use App\\Models\\TranslationItem;<\/strong>\r\n<strong>use Illuminate\\Console\\Command;<\/strong>\r\n<strong>use Illuminate\\Support\\Arr;<\/strong>\r\n<strong>use Illuminate\\Support\\Facades\\Artisan;<\/strong>\r\n<strong>use Illuminate\\Support\\Facades\\DB;<\/strong>\r\n\r\n<strong>class MakeTranslation extends Command<\/strong>\r\n<strong>{<\/strong>\r\n<strong>    \/**<\/strong>\r\n<strong>     * The name and signature of the console command.<\/strong>\r\n<strong>     *<\/strong>\r\n<strong>     * @var string<\/strong>\r\n<strong>     *\/<\/strong>\r\n<strong>    protected $signature = 'make:trans '.<\/strong>\r\n<strong>        '{ --api : Whether use DeepL API automatically or not } '.<\/strong>\r\n<strong>        '{ --locale= : Locale to save }';<\/strong>\r\n\r\n<strong>    \/**<\/strong>\r\n<strong>     * The console command description.<\/strong>\r\n<strong>     *<\/strong>\r\n<strong>     * @var string<\/strong>\r\n<strong>     *\/<\/strong>\r\n<strong>    protected $description = 'Command description';<\/strong>\r\n\r\n<strong>    \/**<\/strong>\r\n<strong>     * Create a new command instance.<\/strong>\r\n<strong>     *<\/strong>\r\n<strong>     * @return void<\/strong>\r\n<strong>     *\/<\/strong>\r\n<strong>    public function __construct()<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        parent::__construct();<\/strong>\r\n<strong>    }<\/strong>\r\n\r\n<strong>    \/**<\/strong>\r\n<strong>     * Execute the console command.<\/strong>\r\n<strong>     *<\/strong>\r\n<strong>     * @return int<\/strong>\r\n<strong>     *\/<\/strong>\r\n<strong>    public function handle()<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        $translation_locale = $this-&gt;option('locale');<\/strong>\r\n\r\n<strong>        if(empty($translation_locale)) {<\/strong>\r\n\r\n<strong>            $translation_locale = config('app.locale');<\/strong>\r\n\r\n<strong>        }<\/strong>\r\n\r\n<strong>        $anticipations = [<\/strong>\r\n<strong>            'key' =&gt; [<\/strong>\r\n<strong>                'question' =&gt; 'Key?',<\/strong>\r\n<strong>            ],<\/strong>\r\n<strong>            'text' =&gt; [<\/strong>\r\n<strong>                'question' =&gt; 'Text?',<\/strong>\r\n<strong>            ],<\/strong>\r\n<strong>        ];<\/strong>\r\n<strong>        $inputs = [];<\/strong>\r\n\r\n<strong>        foreach ($anticipations as $key =&gt; $anticipation) {<\/strong>\r\n\r\n<strong>            $question = $anticipation['question'];<\/strong>\r\n<strong>            $default = Arr::get($anticipation, 'default', '');<\/strong>\r\n<strong>            $anticipation_text = $this-&gt;anticipate($question, [], $default);<\/strong>\r\n\r\n<strong>            if(empty($anticipation_text)) {<\/strong>\r\n\r\n<strong>                $this-&gt;error(ucfirst($key) .' is required');<\/strong>\r\n<strong>                return;<\/strong>\r\n\r\n<strong>            }<\/strong>\r\n\r\n<strong>            $inputs[$key] = $anticipation_text;<\/strong>\r\n\r\n<strong>        }<\/strong>\r\n\r\n<strong>        $translation_key = $inputs['key'];<\/strong>\r\n<strong>        $translation_text = $inputs['text'];<\/strong>\r\n\r\n<strong>        DB::beginTransaction();<\/strong>\r\n\r\n<strong>        try {<\/strong>\r\n\r\n<strong>            $translation = Translation::firstOrNew([<\/strong>\r\n<strong>                'key' =&gt; $translation_key<\/strong>\r\n<strong>            ]);<\/strong>\r\n<strong>            $translation-&gt;save();<\/strong>\r\n\r\n<strong>            $translation_item = TranslationItem::firstOrNew([<\/strong>\r\n<strong>                'translation_id' =&gt; $translation-&gt;id,<\/strong>\r\n<strong>                'locale' =&gt; $translation_locale,<\/strong>\r\n<strong>            ]);<\/strong>\r\n<strong>            $translation_item-&gt;text = $translation_text;<\/strong>\r\n<strong>            $translation_item-&gt;save();<\/strong>\r\n<strong>            DB::commit();<\/strong>\r\n\r\n<strong>        } catch (\\Exception $e) {<\/strong>\r\n\r\n<strong>            DB::rollBack();<\/strong>\r\n<strong>            $this-&gt;error($e-&gt;getMessage());<\/strong>\r\n<strong>            return;<\/strong>\r\n\r\n<strong>        }<\/strong>\r\n\r\n<strong>        $should_translate = $this-&gt;option('api');<\/strong>\r\n\r\n<strong>        if($should_translate === true) { \/\/ DeepL API \u3067\u81ea\u52d5\u7ffb\u8a33\u3059\u308b\u5834\u5408<\/strong>\r\n\r\n<strong>            $this-&gt;info('Translating...');<\/strong>\r\n<strong>            Artisan::call('translate');<\/strong>\r\n\r\n<strong>        }<\/strong>\r\n\r\n<strong>        $this-&gt;info('Done!');<\/strong>\r\n<strong>        return Command::SUCCESS;<\/strong>\r\n<strong>    }<\/strong>\r\n<strong>}<\/strong><\/pre>\n<p>\u3082\u3061\u308d\u3093\u3001<code>Laravel<\/code>\u5074\u3078\u306e\u767b\u9332\u3082\u304a\u5fd8\u308c\u306a\u304f\ud83d\udc4d<\/p>\n<p><strong>app\/Console\/Kernel.php<\/strong><\/p>\n<pre>&lt;?php\r\n\r\nnamespace App\\Console;\r\n\r\n<strong>use App\\Console\\Commands\\MakeTranslation;<\/strong>\r\n\r\n\/\/ \u7701\u7565\r\n\r\nclass Kernel extends ConsoleKernel\r\n{\r\n    \/**\r\n     * The Artisan commands provided by your application.\r\n     *\r\n     * @var array\r\n     *\/\r\n    protected $commands = [\r\n\r\n        \/\/ \u7701\u7565\r\n\r\n        <strong>MakeTranslation::class,<\/strong>\r\n    ];<\/pre>\n<p>\u3053\u308c\u3067\u3001<code>make:trans<\/code>\u3068\u30b3\u30de\u30f3\u30c9\u5b9f\u884c\u3059\u308b\u3068\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u300c<strong>\u30ad\u30fc<\/strong>\u300d\u3068\u300c<strong>\u7ffb\u8a33\u3057\u305f\u3044\u30c6\u30ad\u30b9\u30c8<\/strong>\u300d\u3092\u805e\u304b\u308c\u308b\u306e\u3067\u305d\u308c\u305e\u308c\u5165\u529b\u3059\u308b\u3068DB\u3078\u81ea\u52d5\u7684\u306b\u767b\u9332\u3055\u308c\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10622\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_deepl_translation_16.png\" alt=\"\" width=\"401\" height=\"155\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_deepl_translation_16.png 401w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2022\/05\/laravel_deepl_translation_16-300x116.png 300w\" sizes=\"auto, (max-width: 401px) 100vw, 401px\" \/><\/p>\n<p>\u307e\u305f\u3001<code>--api<\/code>\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u3064\u3051\u308b\u3068\u3001\u81ea\u52d5\u7684\u306b<code>DeepL<\/code>\u3092\u901a\u3057\u305f\u7ffb\u8a33\u3082\u5b9f\u884c\u3057\u3066\u304f\u308c\u307e\u3059\ud83d\ude04\ud83d\udc4d<\/p>\n<h1>\u8ffd\u8a18\uff1a\u7ffb\u8a33\u30c7\u30fc\u30bf\u3092PHP\u30b3\u30fc\u30c9\u306b\u3059\u308b\u30b3\u30de\u30f3\u30c9<\/h1>\n<p><strong>\u3010\u8ffd\u8a18\uff1a2022.6.2\u3011<\/strong><\/p>\n<p>\u8a18\u4e8b\u306e\u9014\u4e2d\u3067\u306f\u8a00\u8a9e\u60c5\u5831\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b<code>DB<\/code>\u304b\u3089\u76f4\u63a5\u8aad\u307f\u8fbc\u3080\u3088\u3046\u306b\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u3053\u308c\u3060\u3068\u3044\u3061\u3044\u3061DB\u3092\u78ba\u8a8d\u3057\u306b\u3044\u304b\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u306e\u3067\u3001\u300c<strong>\u3046\u30fc\u3093\u3001\u305d\u308c\u3082\u3061\u3087\u3063\u3068\u3081\u3093\u3069\u3046\u3060\u306a<\/strong>\u300d\u3068\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<pre><strong>return Translation::getConfigData('ja');<\/strong><\/pre>\n<p>\u305d\u3053\u3067\u3001\u3082\u3046\u3044\u3063\u305d\u306e\u3053\u3068DB\u304b\u3089\u7ffb\u8a33\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3057\u3001PHP\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3059\u308b\u30b3\u30de\u30f3\u30c9\u3092\u3064\u304f\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u3053\u3046\u3059\u308c\u3070\u3001\u30b3\u30de\u30f3\u30c9\u4e00\u767a\u3067\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30d5\u30a1\u30a4\u30eb\u3092\u5404\u8a00\u8a9e\u3067\u81ea\u52d5\u4f5c\u6210\u3067\u304d\u308b\u306e\u3067\u4fbf\u5229\u3060\u3068\u8003\u3048\u307e\u3057\u305f\u3002<\/p>\n<pre><strong>&lt;?php<\/strong>\r\n\r\n<strong>return [<\/strong>\r\n<strong>  'page_title.category' =&gt; '\u30ab\u30c6\u30b4\u30ea',<\/strong>\r\n  \r\n<strong>  \/\/ \u7701\u7565<\/strong>\r\n<strong>];<\/strong><\/pre>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u30b3\u30de\u30f3\u30c9\u306e\u30b3\u30fc\u30c9\u3067\u3059\u3002<\/p>\n<p><strong>app\/Console\/Commands\/GenerateTranslation.php<\/strong><\/p>\n<pre><strong>&lt;?php<\/strong>\r\n\r\n<strong>namespace App\\Console\\Commands;<\/strong>\r\n\r\n<strong>use App\\Models\\Translation;<\/strong>\r\n<strong>use Illuminate\\Console\\Command;<\/strong>\r\n\r\n<strong>class GenerateTranslation extends Command<\/strong>\r\n<strong>{<\/strong>\r\n<strong>    \/**<\/strong>\r\n<strong>     * The name and signature of the console command.<\/strong>\r\n<strong>     *<\/strong>\r\n<strong>     * @var string<\/strong>\r\n<strong>     *\/<\/strong>\r\n<strong>    protected $signature = 'generate:trans';<\/strong>\r\n\r\n<strong>    \/**<\/strong>\r\n<strong>     * The console command description.<\/strong>\r\n<strong>     *<\/strong>\r\n<strong>     * @var string<\/strong>\r\n<strong>     *\/<\/strong>\r\n<strong>    protected $description = 'Generate translation file';<\/strong>\r\n\r\n<strong>    \/**<\/strong>\r\n<strong>     * Create a new command instance.<\/strong>\r\n<strong>     *<\/strong>\r\n<strong>     * @return void<\/strong>\r\n<strong>     *\/<\/strong>\r\n<strong>    public function __construct()<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        parent::__construct();<\/strong>\r\n<strong>    }<\/strong>\r\n\r\n<strong>    \/**<\/strong>\r\n<strong>     * Execute the console command.<\/strong>\r\n<strong>     *<\/strong>\r\n<strong>     * @return int<\/strong>\r\n<strong>     *\/<\/strong>\r\n<strong>    public function handle()<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        $translations = Translation::with('items')\r\n            -&gt;orderBy('key', 'asc')\r\n            -&gt;get();<\/strong>\r\n<strong>        $data = [];<\/strong>\r\n\r\n<strong>        foreach ($translations as $translation) {<\/strong>\r\n\r\n<strong>            $key = $translation-&gt;key;<\/strong>\r\n<strong>            $translation_items = $translation-&gt;items;<\/strong>\r\n\r\n<strong>            foreach ($translation_items as $translation_item) {<\/strong>\r\n\r\n<strong>                $locale = $translation_item-&gt;locale;<\/strong>\r\n<strong>                $data[$locale][$key] = $translation_item-&gt;text;<\/strong>\r\n\r\n<strong>            }<\/strong>\r\n\r\n<strong>        }<\/strong>\r\n\r\n<strong>        $this-&gt;generateLocaleCodes($data);<\/strong>\r\n\r\n<strong>        return Command::SUCCESS;<\/strong>\r\n<strong>    }<\/strong>\r\n\r\n<strong>    private function generateLocaleCodes($data)<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        foreach ($data as $locale =&gt; $locale_data) {<\/strong>\r\n\r\n<strong>            $path = resource_path('lang\/' . $locale . '\/deepl.php');<\/strong>\r\n<strong>            $array_code = var_export($locale_data, true);<\/strong>\r\n<strong>            $array_code = substr($array_code, 7, -1);<\/strong>\r\n<strong>            $code = \"&lt;?php\\n\\nreturn [\". $array_code .\"];\";<\/strong>\r\n<strong>            file_put_contents($path, $code);<\/strong>\r\n\r\n<strong>            $this-&gt;info('Generated locale file for `' . $locale .'`');<\/strong>\r\n\r\n<strong>        }<\/strong>\r\n<strong>    }<\/strong>\r\n<strong>}<\/strong><\/pre>\n<p>\u305d\u3057\u3066\u3001<code>Laravel<\/code>\u3078\u767b\u9332\u3057\u307e\u3059\u3002<\/p>\n<p><strong>app\/Console\/Kernel.php<\/strong><\/p>\n<pre>&lt;?php\r\n\r\nnamespace App\\Console;\r\n\r\n<strong>use App\\Console\\Commands\\GenerateTranslation;<\/strong>\r\n\r\n\/\/ \u7701\u7565\r\n\r\nclass Kernel extends ConsoleKernel\r\n{\r\n    protected $commands = [\r\n\r\n        \/\/ \u7701\u7565\r\n\r\n        <strong>GenerateTranslation::class,<\/strong>\r\n    ];<\/pre>\n<p>\u3053\u308c\u3067\u3001<code>php artisan generate:trans<\/code>\u3092\u5b9f\u884c\u3059\u308b\u3068\u7ffb\u8a33\u7528\u306ePHP\u30b3\u30fc\u30c9\u304c\u4f5c\u6210\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u203b \u306a\u304a\u3001\u4ee5\u524d\u306e\u30d5\u30a1\u30a4\u30eb\u304c\u78ba\u8a8d\u306a\u3057\u3067\u66f4\u65b0\u3055\u308c\u308b\u306e\u3067\u6c17\u3092\u3064\u3051\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h1>\u3061\u306a\u307f\u306b\uff1a\u30bf\u30a4\u30de\u30fc\u5b9f\u884c\u3059\u308b\uff08cron\uff09<\/h1>\n<p>\u30bf\u30a4\u30de\u30fc\u5b9f\u884c\u3059\u308b\u305f\u3081\u306b\u306f<code>cron<\/code>\u3092\u5229\u7528\u3057\u307e\u3059\u3002<\/p>\n<p>\u305f\u3060\u3057\u3001\u5b9f\u884c\u74b0\u5883\u306f<code>Ubuntu<\/code>\uff08<code>Linux<\/code>\uff09\u3067\u3059\u306e\u3067\u3001<code>Windows<\/code>\u3092\u4f7f\u3063\u3066\u3044\u308b\u5834\u5408\u306f\u6c17\u3092\u3064\u3051\u3066\u304f\u3060\u3055\u3044\u3002\uff08<code>mac<\/code>\u306f\u3044\u3051\u308b\u306e\u304b\u306a\uff1f\uff1f\uff09<\/p>\n<p>\u307e\u305a\u3001<code>PHP<\/code>\u306e\u5834\u6240\u3092\u8abf\u3079\u308b\u305f\u3081\u306b\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n<pre><strong>which php<\/strong><\/pre>\n<p>\u3059\u308b\u3068\u3001<code>\/usr\/bin\/php<\/code>\u3068\u3044\u3046\u3088\u3046\u306a\u6587\u5b57\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002\u3053\u308c\u304c<code>PHP<\/code>\u306e\u3044\u308b\u5834\u6240\u3067\u3059\u306e\u3067\u3001\u63a7\u3048\u3066\u304a\u3044\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u305d\u3057\u3066\u3001<code>Laravel<\/code>\u304c\u3042\u308b\u5834\u6240\u3082\u8abf\u3079\u307e\u3059\u3002<br \/>\n<code>Laravel<\/code>\u306e\u30eb\u30fc\u30c8\u30fb\u30d5\u30a9\u30eb\u30c0\u306b\u79fb\u52d5\u3057\u3066\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre><strong>pwd<\/strong><\/pre>\n<p>\u3059\u308b\u3068\u7d76\u5bfe\u30d1\u30b9\u304c\u53d6\u5f97\u3055\u308c\u308b\u306e\u3067\u3001\u3053\u306e\u30d1\u30b9\u3082\u63a7\u3048\u3066\u304a\u3044\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u305d\u3057\u3066\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067<code>cron<\/code>\u306e\u8a2d\u5b9a\u3092\u3057\u307e\u3059\u3002<\/p>\n<pre><strong>sudo crontab -e<\/strong><\/pre>\n<p>\u30a8\u30c7\u30a3\u30bf\u304c\u8d77\u52d5\u3057\u305f\u3089\u4ee5\u4e0b\u306e\u6587\u5b57\u5217\u3092\u8ffd\u52a0\uff06\u4fdd\u5b58\u3057\u307e\u3059\u3002\uff08\u3053\u308c\u306f\u3001\uff11\u5206\u3054\u3068\u306b\u5b9f\u884c\u3055\u308c\u308b\u4f8b\u3067\u3059\uff09<\/p>\n<pre><strong>* * * * * \/usr\/bin\/php \/home\/PATH\/TO\/YOUR\/LARAVEL\/artisan translate<\/strong><\/pre>\n<p>\u3042\u3068\u306f\u3001\u30c4\u30a4\u30c3\u30bf\u30fc\u306e\u30c1\u30a7\u30c3\u30af\u3067\u3082\u3057\u3066\u6642\u9593\u304c\u904e\u304e\u305f\u3089DB\u3092\u30c1\u30a7\u30c3\u30af\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044 \ud83d\udc4d<\/p>\n<h1>\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3092\u3068\u308b<\/h1>\n<p><strong>\u3010\u8ffd\u8a18\uff1a2022.6.18\u3011<\/strong><\/p>\n<p>\u5b9f\u306f\u81ea\u5206\u304c\u3084\u3063\u3066\u3057\u307e\u3063\u305f\u3053\u3068\u306a\u306e\u3067\u3059\u304c\u3001<code>artisan<\/code>\u30b3\u30de\u30f3\u30c9\u3067\u521d\u671f\u5316\u3057\u305f\u76f4\u5f8c\u306b\u3001<code>php artisan generate:trans<\/code>\u3092\u5b9f\u884c\u3057\u305f\u3068\u3053\u308d\u3001\u3053\u308c\u307e\u3067\u306e\u7ffb\u8a33\u304c\u5931\u308f\u308c\u3066\u3057\u307e\u3044\u307e\u3057\u305f\u3002\uff08\u5e78\u3044<code>mysqldump<\/code>\u3067\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3092\u3068\u3063\u3066\u3044\u307e\u3057\u305f\u304c\u3001\u6d41\u77f3\u306b\u7126\u308a\u307e\u3059\u3088\u306d\u2026\ud83d\udca6\uff09<\/p>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u305d\u3093\u306a\u5834\u5408\u3092\u898b\u8d8a\u3057\u3066\u3001\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u305f\u3073\u306b\u7ffb\u8a33\u30c7\u30fc\u30bf\u306e\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3092\u3068\u308b\u3088\u3046\u306b\u3059\u308b\u3068\u3044\u3044\u3067\u3057\u3087\u3046\u3002<\/p>\n<p><strong>app\/Console\/Commands\/GenerateTranslation.php<\/strong><\/p>\n<pre>\/\/ \u7701\u7565\r\n\r\nprivate function generateLocaleCodes($data)\r\n{\r\n    foreach ($data as $locale =&gt; $locale_data) {\r\n\r\n<strong>        $path = resource_path('lang\/' . $locale . '\/deepl.php');<\/strong>\r\n<strong>        $copying_filename = $locale .'_'. now()-&gt;format('YmdHis') . '.php';<\/strong>\r\n<strong>        $copying_path = storage_path('app\/translation_backup\/'. $copying_filename);<\/strong>\r\n<strong>        File::copy($path, $copying_path); \/\/ \u3053\u3053\u3067\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3092\u3068\u3063\u3066\u3044\u307e\u3059<\/strong>\r\n\r\n        $array_code = var_export($locale_data, true);\r\n        $array_code = substr($array_code, 7, -1);\r\n        $code = \"&lt;?php\\n\\nreturn [\". $array_code .\"];\";\r\n        file_put_contents($path, $code);\r\n\r\n        $this-&gt;info('Generated locale file for `' . $locale .'`');\r\n\r\n    }\r\n}<\/pre>\n<h1>\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u304b\u3089\u30a4\u30f3\u30dd\u30fc\u30c8\u3059\u308b<\/h1>\n<p><strong>\u3010\u8ffd\u8a18\uff1a2022.6.23\u3011<\/strong><\/p>\n<p>\u4e0a\u306e\u9805\u76ee\u3067\u81ea\u52d5\u7684\u306b\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3059\u308b\u3088\u3046\u306b\u3057\u307e\u3057\u305f\u304c\u3001\u3053\u308c\u3060\u3051\u3067\u306fDB\u30c7\u30fc\u30bf\u304c\u6d88\u3048\u305f\u3042\u3068\u5143\u306b\u623b\u3059\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093\u3002<\/p>\n<p>\u305d\u306e\u305f\u3081\u3001\u6298\u89d2\u306a\u306e\u3067\u30a4\u30f3\u30dd\u30fc\u30c8\u7528\u306e\u30b3\u30de\u30f3\u30c9\u3082\u3064\u304f\u3063\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<p><strong>app\/Console\/Commands\/ImportTranslation.php<\/strong><\/p>\n<pre>&lt;?php\r\n\r\nnamespace App\\Console\\Commands;\r\n\r\n<strong>use App\\Models\\Translation;<\/strong>\r\n<strong>use App\\Models\\TranslationItem;<\/strong>\r\nuse Illuminate\\Console\\Command;\r\n\r\nclass ImportTranslation extends Command\r\n{\r\n    <strong>\/**<\/strong>\r\n<strong>     * The name and signature of the console command.<\/strong>\r\n<strong>     *<\/strong>\r\n<strong>     * @var string<\/strong>\r\n<strong>     *\/<\/strong>\r\n<strong>    protected $signature = 'import:trans {--path=} {--locale=}';<\/strong>\r\n\r\n<strong>    \/**<\/strong>\r\n<strong>     * The console command description.<\/strong>\r\n<strong>     *<\/strong>\r\n<strong>     * @var string<\/strong>\r\n<strong>     *\/<\/strong>\r\n<strong>    protected $description = 'Import translation';<\/strong>\r\n\r\n<strong>    \/**<\/strong>\r\n<strong>     * Create a new command instance.<\/strong>\r\n<strong>     *<\/strong>\r\n<strong>     * @return void<\/strong>\r\n<strong>     *\/<\/strong>\r\n<strong>    public function __construct()<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        parent::__construct();<\/strong>\r\n<strong>    }<\/strong>\r\n\r\n<strong>    \/**<\/strong>\r\n<strong>     * Execute the console command.<\/strong>\r\n<strong>     *<\/strong>\r\n<strong>     * @return int<\/strong>\r\n<strong>     *\/<\/strong>\r\n<strong>    public function handle()<\/strong>\r\n<strong>    {<\/strong>\r\n<strong>        $path = $this-&gt;option('path');<\/strong>\r\n<strong>        $locale = $this-&gt;option('locale');<\/strong>\r\n\r\n<strong>        if(! file_exists($path)) {<\/strong>\r\n\r\n<strong>            return Command::FAILURE;<\/strong>\r\n\r\n<strong>        }<\/strong>\r\n\r\n<strong>        $translation_data = include $path;<\/strong>\r\n\r\n<strong>        foreach ($translation_data as $key =&gt; $text) {<\/strong>\r\n\r\n<strong>            $this-&gt;info('Importing: ' . $key);<\/strong>\r\n\r\n<strong>            $translation = Translation::firstOrNew([<\/strong>\r\n<strong>                'key' =&gt; $key<\/strong>\r\n<strong>            ]);<\/strong>\r\n<strong>            $translation-&gt;save();<\/strong>\r\n\r\n<strong>            $translation_item = TranslationItem::firstOrNew([<\/strong>\r\n<strong>                'translation_id' =&gt; $translation-&gt;id,<\/strong>\r\n<strong>                'locale' =&gt; $locale<\/strong>\r\n<strong>            ]);<\/strong>\r\n<strong>            $translation_item-&gt;translation_id = $translation-&gt;id;<\/strong>\r\n<strong>            $translation_item-&gt;locale = $locale;<\/strong>\r\n<strong>            $translation_item-&gt;text = $text;<\/strong>\r\n<strong>            $translation_item-&gt;save();<\/strong>\r\n\r\n<strong>        }<\/strong>\r\n\r\n<strong>        return Command::SUCCESS;<\/strong>\r\n<strong>    }<\/strong>\r\n}<\/pre>\n<p>\u4f7f\u3044\u65b9\u306f\u3001\u4ee5\u4e0b\uff12\u3064\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u3064\u3051\u3066\u5b9f\u884c\u3059\u308b\u3060\u3051\u3067\u3059\u3002<\/p>\n<ul>\n<li>&#8211;path\uff1a \u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3055\u308c\u305f\u30d5\u30a1\u30a4\u30eb<\/li>\n<li>&#8211;locale\uff1a \u8a00\u8a9e\uff08<code>ja<\/code>\u306a\u3069\uff09<\/li>\n<\/ul>\n<p>\u5b9f\u884c\u4f8b\u306f\u3053\u3061\u3089\u3002<\/p>\n<pre><strong>php artisan import:trans --path=\/PATH\/TO\/YOUR\/BACKUP\/FILE --locale=en<\/strong><\/pre>\n<p><strong>\u3010\u8ffd\u8a18\uff1a2022.9.15\u3011<\/strong><br \/>\n<span style=\"font-size: 1rem;\">\u30aa\u30d7\u30b7\u30e7\u30f3\u304c<code>--file<\/code>\u306b\u306a\u3063\u3066\u3044\u305f\u3068\u3053\u308d\u3092<code>--path<\/code>\u306b\u4fee\u6b63\u3057\u307e\u3057\u305f\u3002<\/span><\/p>\n<h1>\u5b9f\u969b\u306e\u4f7f\u7528\u4f8b<\/h1>\n<p>\u79c1\u304c\u500b\u4eba\u7684\u306b\u904b\u55b6\u3057\u3066\u3044\u308b\u300c<a href=\"https:\/\/machi-collection.com\/\" target=\"_blank\" rel=\"noopener\">\u8857\u89d2\u30b3\u30ec\u30af\u30b7\u30e7\u30f3<\/a>\u300d\u3092\u300c<strong>\u82f1\u8a9e<\/strong>\u300d\u300c<strong>\u4e2d\u56fd\u8a9e<\/strong>\u300d\u306b\u5bfe\u5fdc\u3055\u305b\u307e\u3057\u305f\u3002<\/p>\n<p>\u8208\u5473\u306e\u3042\u308b\u65b9\u306f\u305c\u3072\u3054\u89a7\u304f\u3060\u3055\u3044\u2757<\/p>\n<ul>\n<li><a href=\"https:\/\/machi-collection.com\/\" target=\"_blank\" rel=\"noopener\">\u8857\u89d2\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\uff1a \u65e5\u672c\u8a9e\uff08\u901a\u5e38\uff09\u7248<\/a><\/li>\n<li><a href=\"https:\/\/en.machi-collection.com\/\" target=\"_blank\" rel=\"noopener\">\u8857\u89d2\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\uff1a \u82f1\u8a9e\u7248<\/a><\/li>\n<li><a href=\"https:\/\/zh.machi-collection.com\/\" target=\"_blank\" rel=\"noopener\">\u8857\u89d2\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\uff1a \u4e2d\u56fd\u8a9e\u7248<\/a><\/li>\n<\/ul>\n<h1>\u4f01\u696d\u69d8\u3078\u306e\u3054\u63d0\u6848<\/h1>\n<p>\u4eca\u56de\u306e\u3088\u3046\u306b<code>DeepL<\/code>\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u3067\u7c21\u5358\u306b\u7ffb\u8a33\u30c7\u30fc\u30bf\u3092\u7528\u610f\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u3057\u304b\u3082\u3001<code>DeepL<\/code>\u306e\u7121\u6599\u67a0\u306f\u300c\u670850\u4e07\u6587\u5b57\uff082022.5.2\u73fe\u5728\uff09\u300d\u3068\u3001\u3068\u3066\u3082\u8a31\u5bb9\u91cf\u304c\u5927\u304d\u3044\u3067\u3059\u306e\u3067\u3001\u3042\u308b\u7a0b\u5ea6\u306e\u898f\u6a21\u307e\u3067\u3067\u3057\u305f\u3089\u7121\u6599\u3067\u5229\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3067\u3057\u3087\u3046\u3002\uff08\u8a73\u3057\u304f\u306f\u3001<a href=\"https:\/\/www.deepl.com\/en\/docs-api\/\" target=\"_blank\" rel=\"noopener\">\u3053\u3061\u3089<\/a>\uff09<\/p>\n<p>\u307e\u305f\u3001\u3068\u306f\u3044\u3048\u300c<strong>AI \u3067\u306e\u7ffb\u8a33\u306f\u7cbe\u5ea6\u306b\u7591\u554f\u304c\u3042\u308b<\/strong>\u300d\u3068\u304a\u8003\u3048\u306e\u65b9\u3082\u3044\u3089\u3063\u3057\u3083\u308b\u3068\u601d\u3044\u307e\u3059\u3002\u305d\u306e\u5834\u5408\u306f <strong><a href=\"https:\/\/translateci.com\/\" target=\"_blank\" rel=\"noopener\">TranslateCI<\/a><\/strong> \u3068\u3044\u3046<strong>\u4eba\u306b\u3088\u308b\u7ffb\u8a33\u30b5\u30fc\u30d3\u30b9<\/strong>\u3082\u3042\u308a\u307e\u3059\u306e\u3067\u3001\u3053\u3061\u3089\u3082\u3054\u5bfe\u5fdc\u304c\u3067\u304d\u308b\u304b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u305c\u3072\u7ffb\u8a33\u6a5f\u80fd\u3092\u3054\u7528\u610f\u306b\u306a\u308a\u305f\u3044\u5834\u5408\u306f\u3001\u304a\u554f\u3044\u5408\u308f\u305b\u304b\u3089\u3054\u9023\u7d61\u304f\u3060\u3055\u3044\u307e\u305b\u3002\u304a\u5f85\u3061\u3057\u3066\u304a\u308a\u307e\u3059\u3002\ud83d\ude04\u2728<\/p>\n<h1>\u304a\u308f\u308a\u306b<\/h1>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u4eca\u56de\u306f\u30a6\u30ef\u30b5\u306e<code>DeepL<\/code>\u3092\u4f7f\u3063\u3066\u3001<code>Laravel<\/code>\u306e\u7ffb\u8a33\u3092\u5b9f\u88c5\u3057\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<p>\u3061\u306a\u307f\u306b\u79c1\u306e\u5834\u5408\u3001\u30d1\u30fc\u30d5\u30a7\u30af\u30c8\u306b\u306f\u7a0b\u9060\u3044\u3067\u3059\u304c\u7559\u5b66\u3057\u305f\u304a\u304b\u3052\u3067<code>DeepL<\/code>\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u306f\u3042\u307e\u308a\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<p>\u3057\u304b\u3057\u3001\u4eca\u56de\u5c11\u3057\u9577\u3044\u6587\u7ae0\u3067\u8a66\u3057\u3066\u307f\u305f\u3068\u3053\u308d\u300c<strong>\u78ba\u5b9f\u306b\u79c1\u3088\u308a\u7ffb\u8a33\u80fd\u529b\u3092\u6301\u3063\u3066\u3044\u308b<\/strong>\u300d\u3068\u3044\u3046\u7d50\u8ad6\u306b\u306a\u308a\u307e\u3057\u305f\ud83d\ude02<\/p>\n<p>\u6b63\u76f4\u306a\u3068\u3053\u308d\u3001\u300c<strong>\u307e\u3041\u3001\u60aa\u304f\u306a\u3044\u3067\u3057\u3087<\/strong>\u300d\u7a0b\u5ea6\u3060\u308d\u3046\u3068\u8003\u3048\u3066\u3044\u305f\u306e\u3067\u3059\u304c\u3001\u30cb\u30e5\u30fc\u30b9\u30b5\u30a4\u30c8\u3092\u30b3\u30d4\u30da\u3057\u3066\u307f\u305f\u3068\u3053\u308d\u3001\u305d\u306e\u307e\u307e\u30cb\u30e5\u30fc\u30b9\u30b5\u30a4\u30c8\u3067\u7d39\u4ecb\u3055\u308c\u3066\u3044\u308b\u3088\u3046\u306a\u82f1\u6587\u3067\u3057\u305f\u3002\uff08\u30cd\u30a4\u30c6\u30a3\u30d6\u304b\u3089\u3059\u308b\u3068\u3061\u3087\u3063\u3068\u9055\u3063\u305f\u308a\u3059\u308b\u306e\u304b\u306a\uff1f\uff1f\uff09<\/p>\n<p>\u79d1\u5b66\u306e\u9032\u6b69\u306f\u3059\u3054\u3044\u3067\u3059\u306d\uff01<br \/>\n\u79c1\u3082\u4e57\u308a\u9045\u308c\u306a\u3044\u3088\u3046\u306b\u3057\u3066\u3044\u304d\u305f\u3044\u3082\u3093\u3067\u3059\u3002<\/p>\n<p>\u3067\u306f\u3067\u306f\u301c\u2757<\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9470\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/08\/no_13.png\" alt=\"\" width=\"294\" height=\"320\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/08\/no_13.png 294w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/08\/no_13-276x300.png 276w\" sizes=\"auto, (max-width: 294px) 100vw, 294px\" \/><br \/>\n\u300cA&amp;W \u306e\u30cf\u30f3\u30d0\u30fc\u30ac\u30fc\u304c<br \/>\n\u3069\u3046\u3057\u3066\u3082\u98df\u3079\u305f\u3044\uff01<br \/>\n\u6765\u65e5\u3077\u308a\u30fc\u305a\ud83d\ude4f\u2728\u300d<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001\u3053\u308c\u306f\u3053\u3053\u6570\u5e74\u306b\u9650\u3089\u305a\u3067\u3059\u304c\u3001\u30b0\u30ed\u30fc\u30d0\u30eb\u5316\u304c\u9032\u3093\u3060\u3053\u3068\u3067\u6d77\u5916\u306e\u65b9\u3092\u65e5\u672c\u3067\u898b\u304b\u3051\u308b\u3053\u3068\u306f\u73cd\u3057\u304f\u306a\u304f\u306a\u308a\u307e\u3057\u305f\u3002 \u7279\u306b\u30a4\u30f3\u30d0\u30a6\u30f3\u30c9\u9700\u8981\u304c\u9ad8\u307e\u3063\u3066\u3044\u305f\u3068\u304d\u306f &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/blog.capilano-fw.com\/?p=10387\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;Laravel + DeepL \u3067\u81ea\u52d5\u7ffb\u8a33\u6a5f\u80fd\u3092\u3064\u304f\u308b&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":10411,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[246],"class_list":["post-10387","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-laravel","tag-246"],"_links":{"self":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/10387","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10387"}],"version-history":[{"count":23,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/10387\/revisions"}],"predecessor-version":[{"id":11481,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/10387\/revisions\/11481"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/media\/10411"}],"wp:attachment":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10387"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10387"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10387"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}