i've started using Bing API translator. all the things is ok but when I tried to translate to it with culture code 'fr-ca',fr-FR then it is translating only using language code 'fr' not with culture code (ca, FR) 'fr-ca', 'fr-FR'.
When I called this API method to translate
translationQuery.Execute().ToList();
throws this exception :
--------An error occurred while processing this request.
and the inner exception is :
--------"Parameter: To has an invalid pattern of characters"
source : System.Data.Services.Client
can any one help me about this problem? and tell me how to translate text with culture code with anyway either API or something else ?
Thanks In advance
sunil
Thanks for your response.
I have more than 10 files and each files have 1000 words that needs to transalate into another languages on bases of culture code not only language code.
English en-GB British English
en-US American English
en-CA Canadian English
Spanish es-ES Castilian Spanish (as written and spoken in Spain)
es-MX Mexican Spanish
es-AR Argentine Spanish
es-CO Colombian Spanish
Portuguese pt-PT European Portuguese (as written and spoken in Portugal)
pt-BR Brazilian Portuguese
Chinese zh-CN Mainland China, simplified characters
zh-TW Taiwan, traditional characters
zh-HK Hong Kong, traditional characters
Instead of doing translation manually is there any others way to translate e.g(es-ES,es-MX,es-CO, es-AR ) ?. since its langauge code is same for all eg:-(es) but have different culture code for each languages. So it may be case that some words have different meaning in es-es and have diffent means in es-MX, es-Co etc.
it would be helpful if found a way to translate on bases of culture code?
Thanks in Advance
Sunil
The reason is that Bing translator doesn't support Canadian French, only Standard French:
http://msdn.microsoft.com/en-us/library/hh456380.aspx
Microsoft Translator continually adds to the list of supported languages for the Translation and Text to Speech methods. You can always obtain the current list of available language codes using the
GetLanguagesForTranslate() or GetLanguagesForSpeak() methods. These methods will return a language code. You can translate that language code into a friendly name in any of the supported languages using the GetLanguageNames() method. Below are the friendly names in English - you can retrieve them in any of the listed languages using GetLanguageNames(). Here is the list (as of February 2014):
...
fr French
If you want to use Canadian French, you'll have to perform the relevant word swaps afterwards manually.
Ss an aside, Google Translate also only supports Standard French.
Related
As in the subject, i'm designing a system that will accept documents in various languages, submitters want to be able to say this was 'written in American English' or 'written in United Kingdom English' (which of course is just 'english' but that's perhaps beside the point as it's still a distinct dialect)
I've been looking at ISO-639-3 but that doesn't appear to account for the 'American English' addition
Has anyone got any ideas?
As you mention ISO 639-3, it seems that you are looking for language codes. Then use en-US for US English, en-GB for British English.
Reference: BCP 47, especially the “Tags for Identifying Languages” part, which is currently RFC 5646.
I have a question about Windows Phone localization. I checked culture and language support for windows phone, for English, there's only English (United States) and English (United Kingdom). I also want to ad English support for Canada and Australia, so how can I do that? Also The display language setting in emulator only has English (United States) and English (United Kingdom) for English, so how can I test other English countries such as Canada and Australia? Thanks!
Fei
Windows Phone 7 has a limited support matrix right now for culture/language combinations. You can see this language support list on MSDN. I would recommend coding to en-CA for Canada if you desire it.
There's some guidance on how to support non-supported languages in WP7 from Microsoft if you view "How do I localize for a language that isn't supported?" section. You're not going to like it though. Here's the snippet of the steps.
Hard code your app to be written in the unsupported language, if you don't plan on supporting more languages in the future. OR, create
your default AppResources.resx file and put your unsupported language
strings in there, if you plan on supporting more languages in the
future or will support additional languages in your submission.
Set your neutral language to one of the supported display languages. For example, 'English (United States)'.
On App Hub, you will be prompted to input metadata and a description for the neutral language you chose (for the above example,
you'll be prompted for English). You must include the following three
items in the 'Detailed description' field to pass certification:
A note, such as ‘The language of this application is [unsupported
language name]’. This note must be written in the same language as the
neutral language. For example, if you chose 'English (United States)'
as your neutral language, the note must be written in English (United
States). This note must be the first item in the ‘Detailed
description’ field. Your app description, in the same language as the
neutral language. Your app description, in the unsupported language.
I would also recommend sticking it in an en-CA file so you can easily swap to it if/when support comes.
My Question
If you want to display Pinyin for Chinese-speaking users, in what "resource file" would you store the Pinyin translation?
Since Pinyin is NOT a "language" per se, but a Latin representation of Chinese characters, it does NOT have a culture code in .NET.
My guess is that we probably need to use the applicable "zh-" (Chinese) cultures and simply place the latin character Pinyin translation inside those resource files.
I apologize in advance if this is a stupid question, but all the different culture stuff is scrambling my brain!!
Background
We're finally getting around to Internationalization of our Web sites. We're handling most of the "Western" cultures okay now (Latin alphabet: "es", "fr", "de") and the different date/number formats. However, the ideogram-based writing systems like Chinese are a challenge due to various legacy systems not handling Unicode. As a short-term workaround, our business area decided to use Pinyin for Chinese speaking users.
So... the business area asked me to "just add a Pinyin resource file" to the site.
The Microsoft culture code is in the format of :
"language-country"
So, take Chinese for example. The code for Chinese is "zh". However, there are many countries and regions that use Chinese, so we append a country code to the language code. "zh-cn" stands for Chinese-Mainland China. Similarly, "zh-tw" represents Chinese for Taiwan.
.Net uses the concept of resource fallback, where resource lookups begins at the level specified and as long as the resource is not found, a less specific resource will be looked at until we get to the default resource. So ideally, the "zh-cn" resource file should contain only resources that are specific to Mainland China. All resources that are common to all Chinese speaking countries should reside in the "zh" resource.
So getting to your question, I believe Pinyin is primarily used in mainland China, and since you are using it as a Chinese translation substitute, I would place the Pinyin translations inside the "zh-cn" resource file.
Is there a way that I can let the end user type text in German / French in a text box for a c# asp.net website. Is there any available solution for the same,
Thank You
You really need to read this:
http://www.joelonsoftware.com/articles/Unicode.html
Are you talking about transliterating from German/French into English? If so, that doesn't make much sense. Transliteration is used to convert one system of text/writing into another, like Greek to English or German to Chinese. With French, German, and English, there is no need to transliterate because they all use the same alphabet/writing system.
Was your question more about how to add a transliteration feature a la Google and you just used French and German as an example?
In a textbox in the application, I need to validate to ensure that a user enters only English language text. I know some languages such as Spanish share English's alphabets. How do I validate text to make sure it's:
Only in English language
Supports only languages that use the English character set (Spanish etc)
Thanks
EDIT: Sorry for not being clear enough. This app is on production and when I check the SQL database where the text is stored, there are a lot of rows with "??? ?????". On further investigation, it appears that this is caused when a non english language text is saved to a database. As an example, go to google news, select google Korea from the dropdown, copy some Korean text and save it to a SQL server database
Anyone?
By "English character set", I guess you are referring to the ASCII character set.
You can iterate through each character and see whether it lies in the ASCII range.
You can try to check against an English dictionary (e.g. OpenOffice has a dictionary which you may use for free, not sure about that though) if most of the used words are recognized by this dictionary.
You could also do some kind of text analysis and check the occurance of each character or short sequence like 'th' etc. Each language has specific character occurances and this could help you determining in what language the text is written.
I would not prohibit certain characters because at least in names special characters occur quite often.
I hope you got an idea of some possibilities.
Best Regards, Oliver Hanappi
If this is for a moderately small amount of text, you could try finding an English dictionary web service and try to look up the words. If lookup fails, you most likely either have a typo or something from another language. I haven't found one that accepts large blocks of text, but there is a web service that operates off of the dict.org database:
DictService
One way is to use a English Language Dictionary / Spell Checker , if is valid English / Spanish Word
a very good sample is this
NetSpell Sample - Spell Checker for .NET
It is as simple as follows
NetSpell.SpellChecker.Spelling SpellChecker =
new NetSpell.SpellChecker.Spelling SpellChecker()
SpellChecker.Text = MyTextBox.Text;
SpellChecker.SpellCheck();
NetSpell Home Page: http://www.loresoft.com/NetSpell