0

I need to add a support for my site for both Hebrew and English Languages. At the first page, there will be a selection of the desired language: Now, by this selection am I supposed to hold some parameter in the config file and the fill my whole application with if (LanParam == English) --> Return Info In English else --> Return Info In Hebrew

Sounds like a lot of code replication. What is the common way to this Nowdays?

I've read different threads here and other forums and I know about the resource file: I'm going to use it for Labels and static texts in my site.

The point is that Hebrew is a language written from right to left while English written from left to right. Am I supposed to prepare different CSS files?

Moreover, I also work with WCF services in my web site (which are also developed within our oragnization). We have 2 options of design: 1. Change the services to accept input of Language and then the correct info is returned by the service as a single output parameter. 2. The service will return 2 properties: info in English and info in Hebrew, and I will manipulate it (on the client side) again using the if (LanParam == English) mentioned above or another way you might suggest me.

I've never done something similar to that, so I would love to hear about how it is done, about popular approaches for multiple language support in web sites and any other useful advice. Thanks in advance.

Cod Fish
  • 917
  • 1
  • 8
  • 37
  • yes, you will need different CSS files for RTL and LTR. in your _Layout.cshtml file (assuming Razor, but works the same with WebForms view engine) you should load the right CSS for the language. some CSS will be shared and can be put in a common file. also use the new `start` and `end`rules if you can (e.g. `text-align: start`), which means "left" in LTR and "right" in RTL. – Tsahi Asher Jan 25 '15 at 14:39
  • have a look at r2.js - it can help convert the css for you – Daniel A. White Jan 25 '15 at 14:41

0 Answers0