Having trouble with IBM Watson Language Translation API from Chinese to English - ibm-cloud

Can someone confirm that IBM Watson Language Translation API works from Chinese to English? I can get Language Identify to work, but not Language Translation. Examples:
Language Translation from French to English:
$curl -v -u "username:password" "https://gateway.watsonplatform.net/language-translation/api/v2/translate?source=fr&target=en&text=je%20suis%20fou"
[response] I'm crazy
Language Translation from Chinese to English:
$curl -v -u "username:password" "https://gateway.watsonplatform.net/language-translation/api/v2/translate?source=zh&target=en&text=%E5%8C%97%E4%BA%AC%E5%B8%82"
[response] 404 error - cannot find service matching the request database

From the Language Translation documentation:
Today, the basic Language Translator service offers three domain-specific translation models:
News - targeted at news articles and transcripts, it translates English to and from Arabic, Brazilian Portuguese, French, German, Italian, or Spanish. It also translates Spanish to and from French.
Conversational - targeted at conversational colloquialisms, it translates English to and from Arabic, Brazilian Portuguese, French, Italian, or Spanish.
Patents - targeted at technical and legal terminology, it translates Brazilian Portuguese, Chinese, Korean, or Spanish to English.
Reference: https://www.ibm.com/watson/developercloud/doc/language-translator/
Based on this information, it looks like what you are trying to do is not supported because it would be Conversational.

Related

Does Watson NLU support Hebrew?

does Watson NLU support Hebrew, including entities, sentiments? couldnt find it in the documentation
thanks very much
Lior
Lior, according to the documentation not. Not yet.
But, I can suggest to you use one Language Translator for using this API with Hebrew and translate to English for using each feature(English has more features available).
In the official documentation has one list of the Supported languages.
The following table shows the supported languages for each feature. Natural Language Understanding automatically detects the language of your source text by default. You can override automatic language detection if you want to specify the language manually.
Supported languages:
See the Official reference here.
You can see this article about other's API's and Supported languages. [Last Update: 24th of April 2017]
No it doesn't. It is very clear in the documentation.You can find it here.
https://console.bluemix.net/docs/services/natural-language-understanding/language-support.html#language-support
At the time of this post, the compatible languages are:
Arabic
Dutch
English
French
German
Italian
Japanese
Korean
Portuguese
Russian
Spanish
Swedish
Currently, English is the only language that supports all functions provided by Watson NLU. The rest have limited support.

IBM Bluemix API for Japanese to English Translation

Does IBM Bluemix Watson_developer_cloud API supports Japanese to English translation?
I am trying to convert Japanese sentence to English using python sample example code provided in watson_developer_cloud examples but I am getting "?????????" as output. There are three domains - conversational, news & patent. Even in Language Translation demo for IBM Bluemix it only shows support for news.
text = ('は自動注入ですので').encode('utf-8')
print(json.dumps(language_translator.translate(text, source='ja',target='en'), indent=2,ensure_ascii=False))
If I am using:
print(json.dumps(language_translator.translate(text,model_id='ja-en-conversational'),indent=2))
I am getting model_id not found error. Please help!
Based on the documentation it seems that only News is supported at this time:
Release Notes mention the addition of English to/from Japanese for News category.
Japanese is not yet listed in the fully supported languages.
I suggest asking in the Watson Developer slack where the development team is around.

Moodle login page language change

In my moodle site english and chinese are enabled. The rest of site changes to chinese when language is changed, but the login page does not change. Can anyone guide me ? Please help.
You should be able to set the default here
yourwebsite.com/admin/settings.php?section=langsettings
Or put this in config.php
$CFG->lang='yourlangcode';
In Site Administration => Language => Language Settings:
Turn off Auto detection
Set language to Chinese
Important: The server where your Moodle is hosted may be in english. If you cant change it to chinese, you may have to set the Locale field to one of these:
ISO-2022-CN (Simplified Chinese)
ISO-2022-TW (Traditional Chinese)
BIG5 (Traditional Chinese in BIG5)
GB2312 (Simplified Chinese in EUC)
And also the config.php setting as Russel said:
$CFG->lang='yourlangcode';
Please let us know if it worked!
HTH!

iOS secondary language localization

I properly set localization for es (Spanish), en (English) and ca (Catalan). Spanish and English are primary while the secondaries are like es-xx and en-xx. Catalan is a secondary that has es-ca code.
Problem is that if I launch the app for example with en-us, en.lproj resources are called because en-us does not exist. Good until this point but, if I remove catalan localization, should do the same and load primary one, es. However, does not load it and loads default one instead (en). I am missing anything? thank you
I'm not sure you're modeling the problem the right way.
The problem with removing Catalan (not sure why you'd remove a localization) is it will fall back to Spanish correct? I assume people in Barcelona and who speak Catalan also speak Spanish but it doesn't feel right to change the language on those users.
In my app I offer English (both UK, US), French, Japanese and Spanish. At startup I get the user's preferred locale and use an NSDictionary to map them to the most appropriate match and if no match is found I fallback to US English. For instance if you live in South Africa the closest English is UK English but if you live in the Philippines US English is more appropriate.
Catalan users will fallback to English unfortunately but in the next version I'll be letting users specify their preferred language from the supported language list as well so they can fallback to Spanish in the future.
Try using NSDictionary to map the user's locale to your app's available languages and see if it solves your issue. Hope this helps!

How to find the official international country code for localization with iPhone app?

I want to localize my app , and I didn't find that the official international code for it. and I found the Korean is ko, is it right? and what are other codes? and the English is en-GB, is it right ? what means about GB, and when I localize my app , I add the en.lporj or en-GB.lproj? Thank you very much!
Correct, Korean is "ko". Full list of language codes. You may be able to append a country code to the language code for resources that are specific to a country. Such as "en_GB" or "fr_CA".
Please review the Language and Locale Designations document.
English is international "en". "en_GB" is for English in Great Britain. It's best to create an en.lproj that contains your international English. If you choose to add GB specific spellings such as "Colour" instead of "Color", add them to en_GB.lproj.
A nice easy list can be found on Applingua's DevZone blog: