You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: chapter-2.md
+13-10Lines changed: 13 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,23 +18,26 @@ After you've finished or skipped this optional step, move on to the next section
18
18
## Choose your option
19
19
20
20
Before you decide if you want to handle translation in your web application, you first need to decide if you want to do the translation from the server or the client.
21
-
The only important step was to make sure the access token was generated on the server side to avoid anyone to steal your consumer key and secret.
22
-
That step was done in the previous steps. Now, once you have a valid access token, you can do the translation either on the client (JavaScript code running
23
-
in the browser) or on the server (JavaScript code running on the node.js server). The path you choose depends on what you want to achieve. Running on the client
24
-
side means no files are transitioning via your server, and you aren’t using any server CPU time. Running from the server means that you control everything your
25
-
users are doing.
26
-
27
-
Either choose [‘Translating from the client’](chapter-2a.md#Chapter2a) or [‘Translating from the server’](chapter-2b.md#Chapter2b) as the next step. If you've already
28
-
completed one of them and would like to try another, please revert back to the original status first. You can save your changes with git and checkout the master branch
29
-
to get a clean start point.
21
+
It is important to make sure that your access token is generated on the server side, though, to avoid anyone being able to steal your consumer key and secret.
22
+
You learned how to generate an access token in the previous steps.
23
+
Now that you have a valid access token, you can do the translation either on the client side, e.g., in JavaScript code running
24
+
in the browser, or on the server, e.g., JavaScript code running on the node.js server.
25
+
The path you choose depends on what you want to achieve.
26
+
Running on the client side removes the need for the files to transition via your server, saving some resources and server CPU time.
27
+
Running from the server gives you more complete control over what your users are doing.
28
+
29
+
You can choose either [Translating from the client](chapter-2a.md#Chapter2a) or
30
+
[Translating from the server](chapter-2b.md#Chapter2b) as the next step.
31
+
If you've already completed one of them and would like to try another, please revert back to the original status first.
32
+
You can save your changes with git and checkout the master branch to get a clean starting point:
30
33
```
31
34
git checkout -b yourbranchname
32
35
git add .
33
36
git commit -am 'save my changes'
34
37
git checkout master -f
35
38
```
36
39
37
-
And you can use following command to bring back your changes if you want:
40
+
You can use the following command to bring back your changes, if you want:
0 commit comments