internationalization

Search engines and browser accept-language

三世轮回 提交于 2019-12-05 03:03:18
I'm building a web portal where language content will generally depend on the "accept-language" sent by the browser. The same content-URI will thus serve different content to different users depending on their browser setting. I'm very curious to know how this will affect search indexing. Does Google index using all languages, and is it handled well? Eduardo Molteni They don't send accept-language, so the site will be indexed in the default language that you select. I recommend you to have different URL for each language, not only for the search engines, but for letting the user change the

rails3 I18n: can't override “1 error prohibited this packet from being saved:”

萝らか妹 提交于 2019-12-05 02:59:52
When i get errors on model Packet, i always see the first (english=not translated) line: 1 error prohibited this packet from being saved: Naam Gelieve het veld Naam in te vullen! The translations for the error for the single field is found! While i have the following in my nl.yml nl: activemodel: errors: template: header: one: "1 fout voorkwam dat dit %{model} kon bewaard worden" other: "%{count} fouten voorkwamen dat deze %{model} kon bewaard worden" body: "Er waren problemen met de volgende velden:" errors: template: body: "Controleer alstublieft de volgende velden:" header: one: "Kon dit {

xslt localization

醉酒当歌 提交于 2019-12-05 02:50:35
I am having following xml file: - <?xml version="1.0" encoding="UTF-8"?> <directory> <employee> <name>Joe Smith</name> <phone>4-0192</phone> </employee> <employee> <name>Sally Jones</name> <phone>4-2831</phone> </employee> </directory> And following xslt : - <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html"/> <xsl:template match="directory"> <div>List of Employee<xsl:value-of select="@directory"/> </div> <br/> <table> <tr> <td>Employee Name</td> <td>Contact Details</td> </tr> <xsl:apply-templates

How to set locale in JavaScript, for example for toLocaleUpperCase()?

独自空忆成欢 提交于 2019-12-05 02:36:02
I'd like to use the JavaScript toLocaleUpperCase() method to make sure that the capitalization works correctly for the Turkish language. I cannot be sure, however, that Turkish will be set as the user's locale. Is there a way in modern browsers to set the locale in run time, if I know for sure that the string is in Turkish? (I ran into this problem while thinking about Turkish, but actually it can be any other language.) There isn't really anything much out there but I came across this JavaScript setlocale function script that you might find useful. You unfortunately cannot set locale during

Postgresql full text search in postgresql - japanese, chinese, arabic

六月ゝ 毕业季﹏ 提交于 2019-12-05 02:32:52
I'm designing a fulltext search function in postgresql for my current project. It works ok with ispell/myspell dictionaries so far. Now I need to add support for chinese, japanese and arabic search. Where do I start? There are no templates or dictionaries available for those languages as far as I can see. Will it work with pg_catalog.simple configuration? Just a hint from the manual : A large list of dictionaries is available on the OpenOffice Wiki . Dictionaries won't help you too much with Chinese - you'll need to look in to NGRAM tokenising... Howardsun The similar solution of link at

Empty catalog when internationalizing JavaScript code

天涯浪子 提交于 2019-12-05 02:16:13
I'm trying to set up Internationalization of JavaScript code in my Django application . My Django app has a locale subdirectory with a properly generated djangojs.po file. The package definition is as follows: # urls.py js_info_dict = { 'packages': ('my_project',), } ./manage.py makemessages worked well as the .po file contains all the to-be-translated strings but no JavaScript string ever gets translated on the website and the catalog is always empty. I also had some problems with. This is how it works for me: Add this to yr root urls.py: js_info_dict = { 'domain': 'djangojs', 'packages': (

Which computer assisted translation format should I use for a ColdFusion site?

♀尐吖头ヾ 提交于 2019-12-05 02:10:50
I am creating a multilingual site that will need to support at minimum five different languages, including Korean and Chinese. The site language is ColdFusion, so Java is the native language. I want to make the site as easy as possible for the next programmer to update, and for third-party translators to use tools that will work easier for them than digging through a SQL database. So far I have come across Resource Bundles, GNU's GetText, and TMX. Which do you recommend and why? Resource Bundles are my preferred choice. I have found they are kind to future programmers, self documenting in many

“Intl not available” in Edge 15

二次信任 提交于 2019-12-05 01:48:50
I'm seeing an Intl not available error in the JS console when my script runs the following code in Edge 15: new Date().toLocaleDateString() I'm a bit stumped by this. It is working just fine in Edge 14, and I can't find any reference to the internationalization API suddenly disappearing from Edge 15. I'm not sure if this is the proper way to test it, but running window.hasOwnProperty("Intl") in the console actually returns true . To me this seems to indicate that Intl actually is there. Anyone with more JS skills able to tell what is really going on here? Make sure your JS code doesn't

Multi-language input validation with UTF-8 encoding

二次信任 提交于 2019-12-05 01:45:26
问题 To check a user input english name is valid, I would usually match the input against regular expression such as [A-Za-z]. But how can I do this if multi-language(like Chinese, Japanese etc.) support is required with utf8 encoding? 回答1: You can approximate the Unicode derived property \p{Alphabetic} pretty succintly with [\pL\pM\p{Nl}] if your language doensn’t support a proper Alphabetic property directly. Don’t use Java’s \p{Alpha} , because that’s ASCII-only. But then you’ll notice that you

How to change validation messages on forms

大憨熊 提交于 2019-12-05 01:41:54
问题 the website I'm developing will be in spanish. Therefore, I'll need the error messages in that language. I created a file under Configuration directory called 'en.yml' in order to accomplish this. And I added the following code in it: es: activerecord: errors: models: announcement: attributes: title: blank: "El título no puede estar vacío." "El título no puede estar vacío" means "The title cannot be blank". When I go and run this code I see a message like the following: "Title El título no