I want my Aurelia app to support multiple languages. For example, when a user navigates to www.mysite.com/sv/start, I want them to view the site in Swedish. What is the best approach for solving this problem in Aurelia?
There is an Aurelia plugin for handling internationalization. Here are some helpful links:
GitHub page
Getting started
Aurelia localization
Using multiple translation files in aurelia-i18n
i18n update announcement
Since we share translations (web portal based on Aurelia and various mobile applications) we use this approach:
Translations are in database;
In Aurelia project we have LanguageService class responsible for loading translations from database and taking care about current language and related, language specific, culture information;
LanguageService is instantiated on the login page and then injected among components via #autoinject from aurelia-framework;
Each component or page has its own binded labels and properties translated from LanguageService;
This approach can be applied in your case because you can parse language id from given route.
Related
In My Project, there are different web pages and My requirement is when a User logs on based on user's language,page has to be displayed in user language.
I have googled it,but does not get proper solution.
I have got Satellite Asssemblies as a solution,but how to implement it?
MSDN documentation of ASP.NET localization is good place to start reading about it. Basic steps are as follows:
Localize your web pages - these would create language specific resources that will yield satellite assemblies for supported languages.
Localize other aspects within application e.g. date/time formatting and input, images, user messages etc
Set the culture and UI culture within your web pages as per needs (e.g. based on browser settings or user preference or user selection etc.). See this for how to do it.
See this walk-through that would quickly walks through basic steps.
I have a ASP.NET website which has various utility scripts/pages for some software but no public website. I would like to use Microsoft's Orchard CMS to create the website for visitors to look at - but would this mean I would have to move the utility scripts?
Can you run ASP.NET pages etc alongside Orchard or do you have to extend Orchard to do those tasks for you? If you can run scripts alongside, is there anything you should do to prevent interference with Orchard?
I will accept an answer from someone who has experience with Orchard or good reasoning.
Thanks in advance!
If you're speaking about existing ASP.NET WebForms application then I guess no, at least it won't be easy.
In this case your best bet would be to either
run those applications separately with appropriate rewrite rules, so for end-user it would look like a single application. With this approach you won't be able to access Orchard features (like user management) from your exisiting app, though.
rewrite your current pages to MVC and move those along with existing utility scripts to a separate Orchard module
If you're speaking about existing ASP.NET MVC application - the solution could be found here.
I'm trying to switch my custom cms written in php into .net c#. I was thinking to use cms as a learning project. I'm going to use C#, NHibernate ORM layer, mssql, mvc3 and jquery.
I'm aware there are plenty of commercials or open source cms, but still I'm going to spend some of my free time trying to learn new technology working on project like this.
So, is there anyone out there who is willing to share some ideas on creating cms domain model, usefull link, ideas, etc.
Thanks
A really basic CMS consist of 3 elements:
one database table to hold your "pages". The table structure is "name" and "content"
a route to transform requests of type /cms/pagename to a fixed controller, the method called cms and pagename as a parameter
a embeddable html editor
Now, there are two ways your "page" can be invoked. It is either create mode or view/edit mode.
In "create" mode, the page is requested but it is not in the database yet (e.g. cms/announcement1). In this mode you create a view consisting of a html editor and upon submit, you persist the page to the database.
In "view" mode, the page is requested and is IS in the database. You perform any necessary rewriting (for example you rewrite internal links of the form [cms/pagename] to a fully routable http address) and render the content.
If the user is authorized to edit the page, you also show a "edit" button which then invokes the html editor with the page loaded and ready to be edited.
And that's it.
There are tons of additional elements (caching, different built-in page types, embedding images, youtubes, preformatted texts) etc. but all of them are optional and you can introduce new features when you have the core already implemented.
Once I wrote a simple CMS following the structure above, it was a part of a bigger solution and till now it's been sucesfully deployed several hundred times. An advantage of a custom CMS is that it can be really simple and easily maintanable.
Ok, I want to build a web site using ASP.Net. My web development skills are very small. However I have used C# a fair bit for some fairly intermediate level work (lists, dictionaries, custom classes etc)
The site I want to build will run on an intranet, and I'll be using the AD to get the current users information.
This information will be cross checked with an MS SQL 2008 database (that already exists on the network) to determine what links they can see.
Other parts of the site will allow the User Table to be viewed and modified if the current user is an admin, and have new users added.
So, what is the best way to do this? I've done some playing and basically confused myself with all the options available..
For example, I can create a New Project, which gives me options like Web Application, MVC2 Web App, MVC3 Web App, Empty Web App, Dynamic Data Entities Web App, Data Linq to SQL Web App, and then some Server controls.
But then I can also go for the New Web Site, which has Web Site, Web Site (Razor), Empty Web Site, Dynamic Data Entities Web Site, Dynamic Data Linq Web Site..
There are too many options!?!?!? And I don't understand what the difference is between them all..
What do people suggest I use?
Have you tried following some of the MSDN Beginner Developer Learning Center stuff? They have a module on Beginning Website Development.
May be I am not answering to the point, but my 2cents. Why don't you go for Sharepoint development in this case. You can use Sharepoint site (having inbuilt AD support too) and develop custom webparts (like the part which queries SQL Server 2008). The advantage of using this is that you can merge the feature in intranet site (if you got one already using Sharepoint), and you can learn new stuffs too. Even it will be quick one and if in future, you want to use the Intranet site for different things, it's easily extensible with minimal fuss.
There are some good tutorials for MVC here http://www.asp.net/mvc.
I suggest if you are building a web site to use MVC as it seems like the latest and greatest from MS at this time. My personal opinion tho.
You would want to just start with New Project.
Ok, this is a lot of things to look at and there a are a few ways to tackle this. First all all just stick to New Web Site for now.
First things is to know if this is an intranet or internet?
it seems like it since you want to use AD, that it is an internal app.
Although there are many ways to accomplish what you are trying to do. I Think the following would be the easiest to implement.
1) Enable digest authentication
2) Set a IE group policy to the User authentication policy to Automatically logon only to intranet - This way people dont get confused to what they enter.
3) Create groups for each type of user in AD
4) Separate each functionality into different folders.
5) Set the web.config for permissons to the appororiate directories.
#Matt provided a link to a useful video ("Choosing the right programming model"). In it, Microsoft's Scott Hanselman describes the distinguishing characteristics of the three primary ASP paths: ASP.NET Web Forms, ASP.NET MVC, or ASP.NET Web Pages. Here's the main bullet points from that presentation:
ASP.NET Web Forms:
Familiar control- and event-based programming model
Controls encapsulate HTML, JS and CSS
Rich UI controls included - datagrids, charts, AJAX (common tasks available out-of-the-box)
Browser differences handled for you
SharePoint builds on Web Forms (so, useful if you want to be a SharePoint dev)
ASP.NET MVC:
Feels comfortable for many traditional web developers
Total control of HTML markup (controls not provided; good grasp of HTML required)
Supports Unit testing, TDD and Agile methodologies
Encourages more prescriptive applications
Extremely flexible and extensible
ASP.NET Web Pages:
Easy to pick up and learn (similar to PHP or classic ASP)
Inline scripting model with Razor and C# or VB.NET
Simplified model with Top-to-bottom execution
Full control over your HTML
Friendly Helper syntax (encapsulated functionality, similar to Web Forms controls) makes extending your apps easy
All these models are built on common ASP libraries, so there is considerable overlap, and a fairly straightforward path to migrate an app from one model to another.
I am an intermediate asp.net and C# programmer.
I decide to develop a cms that contain below features:
modules common data, store in one table(contents table)
modules do not contain any data, only container for displaying data
information displayed in modules retrieve according to applied filters on modules common data table(contents). filters like(SubjectCode, GroupCode, ContentType, ...)
modules common settings hold in separate tables(BaseModules and ContentModules)
all contents contain access level
feasibility to define skin for modules
feasibility to commenting and rating contents
hierarchical page definition
SEO and Url Rewriting
theme
I doubt to develop cms myself or use ready cms. Please help me.
I worked for a long time with microsoft portal starter kit.
Image address of database diagram is:
Blockquote
http://www.4freeimagehost.com/show.php?i=1d3239cad5a2.gif
Blockquote
There are plenty of good free CMS systems out there. I would suggest starting with Google.
A former employer spent over £200,000 on a system (against my recommendation) on a CMS which was essentially a custom Web User Interface over the top of a free CMS backend. The user interface was very slick, but this just goes to show that you should not try to re-invent the wheel.