日本語ページ
Deployment of personal translation servers
VRHandsFrame’s translation functionality is by default based on a single translation server that is shared by all users.
Since the translation server uses a service called Google App Script (GAS), the number of translations is limited (5000 times/day). In other words, in the default state, 5000 times/day of translation resources are shared by all users.
This page explains how to use GAS to deploy a personal translation server in VRHandsFrame.
By using your own personal translation server, each user can use the full 5000 times/day translation resource.
*These are the installation procedures as of May 2023; changes in Google’s specifications or updates to VRHandsFrame may result in changes to the procedures.
Index
- Create a Google account and sign in
- Set the translation script in GAS and get a Deployment ID
- Set Deployment ID (GAS Key) to VRHandsFrame
1. Create a Google account and sign in
Please create a Google account and log in.
If you already have an account, you do not need to create a new account.
2.Set the translation script in GAS and get a Deployment ID
Open this link and click on “New project” in the upper right corner to
Open the Create New Project page.
![](https://eurekaworks.jp/wp-content/uploads/2022/05/新しいプロジェクトの作成-en.png)
Copy the script below and overwrite the script set up in the new project.
function doPost(e) {
//console.log(e.postData.contents);
var p = JSON.parse(e.postData.getDataAsString());
var translatedText = LanguageApp.translate(p.text, p.source, p.target);
//console.log(translatedText);
return ContentService.createTextOutput(translatedText);
}
Overwrite the script and save the project.
![](https://eurekaworks.jp/wp-content/uploads/2022/05/コードを保存-en.png)
Next, click the blue “Deploy” button in the upper right corner and select “New deployment”.
![](https://eurekaworks.jp/wp-content/uploads/2022/05/新しいデプロイを選択-en-1024x194.png)
Click on the gear icon in the upper left corner and select “Web app”.
![](https://eurekaworks.jp/wp-content/uploads/2022/05/ウェブアプリを選択-en.png)
Enter some description in the “New Description” field.
Change the “Who has access” field to “Anyone“.
Do not change the “Execute as” field.
(Make sure your Gmail address is filled in).
When you have finished making changes to the input fields, click the Blue “Deploy” button in the lower right corner to proceed.
![](https://eurekaworks.jp/wp-content/uploads/2022/05/アクセスできるユーザを全員に-en.png)
On the next window, copy the “Deployment ID”.
Finally, click the “Done” button to complete the deployment.
![](https://eurekaworks.jp/wp-content/uploads/2022/05/デプロイIDをコピーする-en-1.png)
If you want to check the “Deployment ID” of a deployed project later, you shall select “Manage deployments” .
![](https://eurekaworks.jp/wp-content/uploads/2022/05/デプロイを管理-en-1-1024x202.png)
3. Set Deployment ID (GAS Key) to VRHandsFrame
Set the “Deployment ID” copied in step 2 in VRHandsFrame.
Right-click the icon in the task tray and select [Preference] from the displayed menu.
![](https://eurekaworks.jp/wp-content/uploads/2023/05/task_tray.png)
Enter the “deployment ID” in the text box of [API Key Settings > Translation > Google App Script] and click OK.
![](https://eurekaworks.jp/wp-content/uploads/2023/05/preferences-en_for_gas.jpg)
This completes the settings for using the personal translation server of GAS.