22import { App , initializeApp } from 'firebase-admin/app' ;
33import { Firestore , getFirestore } from 'firebase-admin/firestore' ;
44import { getStorage , Storage } from 'firebase-admin/storage' ;
5- import { getAuth , Auth } from 'firebase-admin/auth' ;
5+ import { Auth , getAuth } from 'firebase-admin/auth' ;
6+ import { TranslationServiceClient } from '@google-cloud/translate' ;
67
78// BATCH OPERATION
89export const BATCH_MAX = 500 ;
@@ -25,3 +26,16 @@ export const firestoreService: Firestore = getFirestore(app);
2526export const authService : Auth = getAuth ( app ) ;
2627export const storageService : Storage = getStorage ( app ) ;
2728export const bucket = storageService . bucket ( ) ;
29+ export const translationService = new TranslationServiceClient ( )
30+
31+ // Translation
32+ export const SUPPORT_LOCALES = new Set ( [
33+ "af" , "am" , "ar" , "az" , "be" , "bg" , "bn" , "bs" , "ca" , "ceb" , "ckb" , "co" , "cs" , "cy" , "da" , "de" ,
34+ "el" , "en" , "eo" , "es" , "et" , "eu" , "fa" , "fi" , "fr" , "fy" , "ga" , "gd" , "gl" , "gu" , "ha" , "haw" ,
35+ "he" , "hi" , "hmn" , "hr" , "ht" , "hu" , "hy" , "id" , "ig" , "is" , "it" , "iw" , "ja" , "jw" , "ka" , "kk" ,
36+ "km" , "kn" , "ko" , "ku" , "ky" , "la" , "lb" , "lo" , "lt" , "lv" , "mai" , "mg" , "mi" , "mk" , "ml" , "mn" ,
37+ "mr" , "ms" , "mt" , "my" , "ne" , "nl" , "no" , "ny" , "or" , "pa" , "pl" , "ps" , "pt" , "ro" , "ru" , "rw" ,
38+ "sd" , "si" , "sk" , "sl" , "sm" , "sn" , "so" , "sq" , "sr" , "st" , "su" , "sv" , "sw" , "ta" , "te" , "tg" ,
39+ "th" , "tk" , "tl" , "tr" , "tt" , "ug" , "uk" , "ur" , "uz" , "vi" , "xh" , "yi" , "yo" , "zh" , "zh-TW" , "zu"
40+ ]
41+ )
0 commit comments