It is meant to provide any extra information about the context of your string for when you’re ready to bring in professional translators. The value is the text that will be displayed in your app. The key is how you’ll reference this string in your app. I’m going to add a string that welcomes users to my app: To add your first string, click Add String. Click Open Project in the top right corner to be directed to the Strings Management page. Next, let’s go to the page where we’ll be adding our strings. The first language tile is your base language - the language you’re translating from.Ĭlick “Add Language” to select a language that you want your app to use. After naming your project you’ll be directed to your language dashboard: Whenever you’re ready to hire professional translators, you simply invite them to the i18nexus project and you’re done. i18nexus allows us to store our app strings in the cloud and automatically translates them to as many languages as we want. Let’s start up our development server with npm startĮver since I started using i18nexus, I haven’t used i18next without it. I18next-browser-languagedetector: Detects your users’ preferred language based on browser settings. I18next-http-backend: Let’s us use AJAX for loading translation files. React-i18next: Gives us React-friendly hooks, components, and functions for i18next. Npm install i18next react-i18next i18next-http-backend i18next-browser-languagedetector -saveĭon’t worry, these packages are all very lightweight and easy to use. Next, let’s cd into the React app directory and install a few i18next packages: I am going to bootstrap together a simple React application using create-react-app: i18next is one of the most popular JavaScript localization libraries around, but its power is truly unleashed when used with i18nexus and its awesome API for scalable translation management and Google Translate automation. In the second header value, you should replace API_key with the key that you previously obtained in Step 2.We’re going to take a look at localizing a React app with react-i18next and i18nexus. Headers: In the Headers section of Apipheny, add three row with the following keys and values: Header 1 Key: Now copy and paste your complete Google Translate API URL into the Apipheny add-on, where it says API URL Path, followed by any parameters required for your query (if applicable).įor this example, we are using the Languages endpoint, which returns a list of supported languages for translation. The documentation specifies what method is required for each endpoint.ĪPI URL: In Step 3, we explained how you can find the Google Translate REST API endpoint that you need. For this example, we are using the GET method. Method: At the top of the Apipheny sidebar, select the HTTP method ( GET or POST) required by your API endpoint. With the Import tab open, enter these details into the add-on: Now go back to your Google Sheet and make sure that the Apipheny add-on is open on the “Import” tab. Step 4.) Enter your Google Translate API request into Apipheny All endpoints should be appended to this base URL. Click Apipheny then click Import API to open the Apipheny sidebar in your Google Sheet.Īll API calls to the Google Translate API should be made to the base domain. In the dropdown list you should see Apipheny. There is a 30 day free trial included.ġ.) Install Apipheny by opening the following link on desktop and then clicking the Install button in the Google Marketplace: Ģ.) After you’ve installed Apipheny, open a Google Sheet and then click on the Extensions dropdown in the menu at the top. You can use Apipheny to connect your Google Sheets to unlimited API data sources, make unlimited API requests, and more. Step 1.) Install and open the Apipheny add-on for Google SheetsĪpipheny is an API connector for Google Sheets. Run the API request in your Google Sheet.Enter your Google Translate API request into Apipheny.In this tutorial, we’ll show you how to connect the Google Translate API to Google Sheets in 5 steps: We can use the Google Translate API to import data from Google Translate into Google Sheets. Google Translate is a multilingual neural machine translation service developed by Google, to translate text, documents and websites from one language into another. Connecting the Google Translate API to Google Sheets
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |