internationalization

Localisation/I18n of database data in LINQ to SQL

走远了吗. 提交于 2019-12-03 21:33:33
I have status tables in my database, and "localised" tables that contain language-specific versions of those statuses. The point of the main status table is to define the status ID values, and other meta-data about the status. The "localised" table is to display the text representation in a UI, according to the users' preferred language. Here is an example schema: create table [Language] ( ID smallint primary key, ISOName varchar(12) ) create table EmployeeStatus ( ID smallint primary key, Code varchar(50) ) create table EmployeeStatusLocalised ( EmployeeStatusID smallint, LanguageID smallint,

Pluralising and Localizing strings in C#

ぐ巨炮叔叔 提交于 2019-12-03 21:29:10
I've got a C# WPF application I'm attempting to globalize with resx files. It works splendidly. I've run into a hitch, however. I've got a relatively simple solution for pluralisation where I have a singular and plural form of the string I'm displaying and I pick one based on the number of whatever things I'm talking about. However, I've recently come to terms with the fact that some cultures have multiple plural forms. Has anyone come across a good solution to this problem in C#, let alone WPF? The canonical example that I've seen for this problem comes from the Polish language. Polish has a

Magento - Difference between translate.csv and core_translate

江枫思渺然 提交于 2019-12-03 21:09:12
What is the difference between translate.csv translations and the database method via the table core_translate ? Sergei Guk Here is part of init() method from app/code/core/Mage/Core/Model/Translate.php //Loading data from module translation files foreach ($this->getModulesConfig() as $moduleName=>$info) { $info = $info->asArray(); $this->_loadModuleTranslation($moduleName, $info['files'], $forceReload); } $this->_loadThemeTranslation($forceReload); $this->_loadDbTranslation($forceReload); From it you can see that Magento load translation in the following order, i.e. there are three options in

Internationalization of ASP.NET apps

人走茶凉 提交于 2019-12-03 20:16:05
问题 How do you guys handle translation/internationalization of your ASP.NET applications? How do you work with your translators? We have ASP.NET apps that need to be available in German, French, Italian, English. We use string resources everywhere. However, more than once, our translators have told us just getting a bunch of "txtMyTextbox.Text" and then a German text to be translated is next to impossible to deal with - the context is missing. So are there any other solutions available? Due to

AWS Cloudfront distribute multilingual angular apps

那年仲夏 提交于 2019-12-03 19:00:03
I have an Angular app which is store in a AWS S3 bucket and distributed by Cloudfront. Now I want to distribute my app in multiple languages. I've already translated my angular app and for each language I have on build. So my S3 bucket looks like this: de /index.html /script.js en /index.html /script.js For each language I want to serve another app. In Cloudfront I created two Origins which points to Origin Path /de and /en So my URL schema is like this: <appname>.<mydomain>.com/:lang But my problem is, I dont get the Error Pages to work with these specific language folders. I need these Error

Internationalization and Search Engine Optimization

℡╲_俬逩灬. 提交于 2019-12-03 18:35:57
问题 I'd like to internationalize my site such that it's accessible in many languages. The language setting will be detected in the request data automatically, and can be overridden in the user's settings / stored in the session. My question pertains to how I should display the various versions of the same page based upon language in terms of the pages' URL's. Let's say we're just looking at the index page of http://www.example.com/ , which defaults to English. Now if a French-speaker loads the

How can I convert language of a div?

丶灬走出姿态 提交于 2019-12-03 18:15:53
问题 I am recently working in a project. There I need to convert language from English to Japanese by button click event. The text is in a div. Like this: "<div id="sampletext"> here is the text </div>" "<div id="normaltext"> here is the text </div>" The text is come from database. How can I convert this text easily? 回答1: Assuming that you have both the English and the Japanese version in the database, you can do two things: Use AJAX to load the correct text from the database and replace the

Missing locale data for the locale “ru” Angular 5

元气小坏坏 提交于 2019-12-03 18:01:46
问题 I updated Angular to version 5 and get this error It seems to me the error with pipe in this line <h5>{{ event.date | date:"yyyy.MM.dd"}}</h5> . Anybody knows how to fix this? 回答1: It seems you don't update your pipe since breacking change of angular 5 see: https://github.com/angular/angular/blob/master/CHANGELOG.md by default Angular now only contains locale data for the language en-US, if you set the value of LOCALE_ID to another locale, you will have to import new locale data for this

Unable to create a file with foreign language characters

风格不统一 提交于 2019-12-03 18:01:38
问题 I get the following error, when trying to save a properties file (containing name/value pairs) with foreign language characters. How do I set the encoding? Save could not be completed. Some characters cannot be mapped using "Cp1252" character encoding. Either change the encoding or remove the characters which are not supported by the "Cp1252" character encoding. 回答1: That looks like Eclipse. Cut the whole contents of the file into the clipboard. Save the (now empty) properties file. Change

How to get the language value from $_SERVER['HTTP_ACCEPT_LANGUAGE'] using PHP?

狂风中的少年 提交于 2019-12-03 17:55:46
问题 <?php $language = $_SERVER['HTTP_ACCEPT_LANGUAGE']; echo $language; ?> When I use Firefox to test this block of code, I get en-us,en;q=0.7,ja;q=0.3 , when I use IE to test the block of code, I get zh-cn . Is the value of $_SERVER['HTTP_ACCEPT_LANGUAGE'] a string? How to determine whether the preferred language is Chinese or Japanese? How can I write a regular expression to get the language from the value of $_SERVER['HTTP_ACCEPT_LANGUAGE'] ? 回答1: Yes, the value of $_SERVER['HTTP_ACCEPT