Ask coding questions

← Back to all posts
How to translate your website into Japanese?
RixTheTyrunt

Hello, I am doing a website, which can be translate WHOLE into Japanese. So, I want to ask you: Is it possible to translate your website ONLY to Japanese ( Also no Google Translate, cause it has many languages to translate. ) I tried <html lang="jp"> but it didn't do anything.

Voters
GautamSudarshan
CoderGautamYT
RixTheTyrunt
Comments
hotnewtop
mabelgoodrich

Thanks for sharing this way to have Japanese language translated from other foreign languages. Being a new programmer, I have learnt something new from this discussion. This example helps learners like me with tracing the error in the similar programming project. In the meantime, I found the Chicas guapas en bikini with wonderful girls and women around the world. By the way, this is a great platform for learning how to implementing the potential code for making human friendly webpage! Thanks for the sharing.

Axrevyn

Link is probably a scam or something

RixTheTyrunt

Do not share links like that

CoderGautamYT

You would probably want to make a javascript code that iterates through each text element and sends it to google translates api for japanese, and updates the text element with the response.

RixTheTyrunt

But, how to get response from other webs?

CoderGautamYT

Using the fetch api. Hold on, working on an example to show you. @RixTheTyrunt

CoderGautamYT

Here, I have made a function which you can use to translate into any language (your case, japanese). Here it is: https://replit.com/@CoderGautamYT/googletranslateapi

Just copy the function in api.js and use the function as shown in script.js. If you need any help, reply here.
@RixTheTyrunt

RixTheTyrunt

translate is not defined error.

RixTheTyrunt

I fixed that error, now the only thing is: It doesn't translate

RixTheTyrunt

Wait, why does it show TypeError: Failed to fetch in the body?!

CoderGautamYT

I'm forking and fixing it, hold on. @RixTheTyrunt

CoderGautamYT

I will send u fixed code @RixTheTyrunt

RixTheTyrunt

Oh, OK!

CoderGautamYT
RixTheTyrunt

Update the code, I almost every time edit it, so... Watch out.

CoderGautamYT

Ok, I think google is somehow detecting the request, I think using a node.js server should help, hold on... im making [email protected]

GautamSudarshan

Hey its me CoderGautam on a different account, I used a different method to do your website, see if this works for you. https://replit.com/@GautamSudarshan/EarlyMatureGreenware#index.html @RixTheTyrunt

CodingElf66

Just use Google Translate. Copy the displayed text and paste it into Google Translate. Then make a transition, so if the user does something, it renders that template with Japanese on it. Hope this helps, and hope you can mark it as answered!

ch1ck3n

why do you not want google translate, is free

RixTheTyrunt

It translates to all languages, while I want ONLY JAPANESE.

ch1ck3n

@RixTheTyrunt why do you only want Japanese

RixTheTyrunt

Look, this is actually an Japanese font, so I got an idea.

ch1ck3n

@RixTheTyrunt can't you just use google translate for that