The Google Translate
There is in the base of the goods with the description.
They have such parameters:
title, h1, meta_description and text.
You need to create a page on which the data from the database is uploaded and automatically translated from Russian to Ukrainian. It also adds the possibility of changing language, from both sides.
We are going to integrate this code to ourselves in the admin.
-
2118 32 0 Your Google Translate API
$key = 'YOUR_API_KEY'
Function for translation of text
function translate($text, $source, $target) {
the global $key;
$url = 'https://translation.googleapis.com/language/translate/v2?key=' .The Key;
$data = array(
‘q’ = $text,
… ‘source’ = $source
‘target’ = $target
and the
$options = array(
‘HTTP’ = array(
'header' => 'Content-type: application/x-www-form-urlencoded',
‘method’ = ‘post’
'content' => http_build_query ($data)
and
and the
$context = stream_context_create ($options)
$result = file_get_contents ($url, false, $context)
if ($result === false) {
The return false.
The
$result = json_decode ($result, true)
if (!isset($result['data']['translations'][0]['translatedText'])) {
The return false.
The
return $result['data']['translations'][0]['translatedText']
The
Examples of use
$text = ‘Hello, world!‘;
$source = ‘en’;
$target = ‘uk’
$translation = translate ($text, $source, $target)
echo $translation; // will release "Hello, the world!"
-
199 9 3 1 Good day .
I realize throughout the day. You have access to the API translate. to turn.
-
1857 43 0 I just finished a project like that.
HTTPS://freelancehunt.com/project/napisat-skript-dlya-perevoda-tekstov-iz/1166195.html
Turn to!
-
4820 66 0 Good day ! I can integrate it immediately to the admin or as you want. WEB for what?
-
283 6 1 At present, the app is not supported by Google (this means receiving the key). But I have my own carpet that translates pages. We can talk. The two days indicated are for any case if unpredictable overwhelming occurs.
-
4327 215 0 1 Good morning, I worked with the API translate, ready to perform. Write to the page and discuss the details.
-
2110 71 0 Good day . I've done such a translator, please write details in the message.
Do you need all the languages that supports Google Translate?
Current freelance projects in the category PHP
Wordpress for project consultation
16 USD
Need consultation with a WordPress developer and potentially possible further collaboration on various projects PHP, Web Programming ∙ 20 minutes back ∙ 27 proposals |
Product search function by imageIt is necessary to develop and integrate a product search function by image on the website.What needs to be implementedA "Search by Photo" button on the website.Image upload by the user: JPG.Search for visually similar products in the catalog.Display results in the form of… PHP, Web Programming ∙ 2 hours 56 minutes back ∙ 20 proposals |
Parser expireddomains.net
113 USD
A parser is needed for expireddomains.net. You need to log in to the site first; the problem is that it blocks the IP when trying to parse data. You need to parse thematic domains based on a list of keywords. If you are not confident in your abilities, please do not write. PHP, Web Programming ∙ 2 days 1 hour back ∙ 49 proposals |
Integration of payment service with Sales Force
70 USD
There is a payment system widget on the site that needs to be integrated with Salesforce so that all required parameters are visible on the Salesforce side. It needs to be done in such a way that all payments and subscriptions are controlled through Salesforce. PHP, Web Programming ∙ 2 days 5 hours back ∙ 40 proposals |
Intercom systems
90 USD
We are looking for an experienced BAS (1C 8.3) programmer to refine a custom configuration for the business processes of our company. What is needed: — Study the current custom BAS 8.3 configuration — Refine and adjust it to our processes — Accounting: clients, contracts,… PHP, Databases & SQL ∙ 5 days 4 hours back ∙ 13 proposals |