internationalization

Advice on css and Html

二次信任 提交于 2019-12-12 15:06:54
问题 I need some advice on css and styles, is not an easy question to ask, I'm on the way to develop a project that's going to be in a few languages, I know how to manage the dictionaries, at least for now, but I was with a bigger issue ... The page it's going to be on english, and also japanese and hebrew, they have a different style like they watch and read from right to left in some pages. How can I manage this? I was thinking on using templates, but is not that easy to do that, the other

Problem when concatenating string and a resource value

白昼怎懂夜的黑 提交于 2019-12-12 13:33:03
问题 I'm having a strange behavior in my .aspx page. I'm internationalizing some pages, but as I want to keep only entities or value object in my resource I want to have a key-value like: (pt-br) CITY - Cidade STATE - Estado ... But when I list the entities, I want to put the " : " at end. Like: <asp:Label ID="LabelCity" runat="server" Text="<%$ Resources:Localizacao, CITY %>:"></asp:Label> But, if I put the " : " after the resource in text property, the page only shows " : ". My simple solution

Get NativeEnglishName from iso currency symbol without dependency to the current culture of logged in user

梦想与她 提交于 2019-12-12 13:30:59
问题 what I have is the currencyIsoCode "EUR". This Property can also be found in the RegionInfo class => ri.ISOCurrencySymbol. But the RegionInfo class depends on the current logged in user. What I want is to get the NativeEnglishName like "Euro" even when the user is from en-De, en-Us, cn-CN etc... How can I do that? 回答1: Awkward problem, there is no easy way to iterate the available RegionInfo. You'd have to iterate all available specific cultures and create their RegionInfo to compare. This

DateComponentsFormatter drop zero hours but not zero minutes

自作多情 提交于 2019-12-12 12:44:04
问题 I'm trying to use a DateComponentsFormatter to format a number of seconds into a time string HH:MM:SS. I always want to show the minutes and seconds fields but I don't want to show hours if hours is 0. I tried setting formatter.zeroFormattingBehavior = .dropLeading But, this causes the minutes to be dropped as well if both hours and minutes are 0. Currently, my solution is as follows: if timeElapsed >= 3600 { formatter.allowedUnits = [.second, .minute, .hour] } else { formatter.allowedUnits =

WPF double valued data binding with custom decimal separator

最后都变了- 提交于 2019-12-12 12:32:11
问题 Is there a centralized way to have the WPF UI to respect the customized decimal separator set in Control Panel -> Regional Settings? When I bind a double valued data to a text box, I want to enter the value using the decimal separator set in Regional settings. The code below (when put in App's ctor) will use the decimal separator of the current culture settings, but will not respect the customized decimal separator setting. I was hoping that this code could somehow easily be exteded to cover

Java EE Directory Structure

一世执手 提交于 2019-12-12 12:23:47
问题 I have a problem with following tutorial: http://www.mkyong.com/jsf2/jsf-2-internationalization-example/ In faces-context file you have to declare the place where all the language properties-files are ( <base-name>HERE</base-name> ). But in that example they use apparently maven2 and so they have a resource folder. I am using eclipse and dynamic web project, that's why there is no resource folder. I tried a few possibilities like adding a new folder to the build path but I don't get it work.

Devise attributes for i18n?

荒凉一梦 提交于 2019-12-12 12:13:13
问题 How can I translate the attributes of Devise's models? E.g. session.email or session.remember_me . Both hierarchies de: devise: sessions: email: "E-Mail" and de: activerecord: attributes: session: email: "E-Mail" do not work. What is the right identifier? 回答1: I stumbled upon the solution by myself: I have to define the model names in the namespace of simple_form as described here: https://github.com/plataformatec/simple_form (bottom). 回答2: The Devise I18n config files are for flash messages

Issue with spanish characters in java string

谁说我不能喝 提交于 2019-12-12 11:43:00
问题 I have issue with spanish characters in java string. I have a content in a file and when i try to transform it to java object using InputStreamReader, the output of some string is "cómo" which should be "cómo". This is happening other spanish like á = á é = é í = í ó = ó ú = ú and more.. Could you please help me to convert it appropriate output. Thanks in advance 回答1: Have you tried to specify the character encoding in the constructor of InputStreamReader , like so: FileInputStream fis

Filter Outlook appointments by category

谁说我不能喝 提交于 2019-12-12 11:16:29
问题 I have written this code to find the total duration of all appointments of a specified category within a specified time range: private readonly MAPIFolder _timing; private int CalculateTotalDuration(DateTime start, DateTime end, string category) { string filter = String.Format( "([Start] >= '{0:g}') AND ([End] <= '{1:g}') AND ([Categories] = '{2}')", start, end, category); return _timing.Items.Restrict(filter).Cast<AppointmentItem>(). Sum(appt => appt.Duration); } This code results in the

What options do exist now to implement UTF8 in Ruby and RoR?

点点圈 提交于 2019-12-12 11:04:55
问题 Following the development of Ruby very closely I learned that detailed character encoding is implemented in Ruby 1.9. My question for now is: How may Ruby be used at the moment to talk to a database that stores all data in UTF8? Background: I am involved in a new project where Ruby/RoR is at least an option. But the project needs to rely on an internationalized character set (it's spread over many countries), preferably UTF8. So how do you deal with that? Thanks in advance. 回答1: Ruby 1.8