Localizing a LightSwitch Application
This article shows creation of a LightSwitch application then how to localize it.
If we are localizing a Silverlight client then we need to upgrade it first. Go to the menu bar, choose Project, then Upgrade Project. If the Upgrade Project command doesn't appear then the project is already upgraded.
We need Microsoft LightSwitch for Visual Studio Update 2 to localize a LightSwitch application.
Creating the LightSwitch HTML Application using Visual Studio 2012 - Part 1
Procedure for creating a LightSwitch HTML Application
Step 1
Getting Started
- Open Visual Studio 2012.
- Go to "File" => "New" => "Project..."
- Select "LightSwitch" in installed templates.
- Select "LightSwitch HTML Application (Visual C#)".
- Enter the Name and choose the location.
- Click "OK".
Step 2
The Application Designer appears.
Step 3
Right-click on the Server or Application data to add a table.
Step 4
In the table add the following fields and name it "Employee".
Step 5
Now the Solution Explorer consists of the following items:
Step 6
In the Solution Explorer, right-click or double-click on "HTML Client" and choose "Add Screen".
Step 7
The Add New Screen Dialog box will appear.
Step 8
Add a Browse Data screen that's named "BrowseEmployee", and then choose "Employee" as the Screen Data.
Step 9
Now the solution consists of the following items:
Step 10
Again form the Solution Explorer, right-click or double-click on "HTML Client" and choose "Add Screen".
Step 11
Add an "Add/Edit Details" screen that's named "AddEditEmployee" and then choose Employee as the Screen Data.
Step 12
In the Solution Explorer, under HTML Client, right-click or double-click on the "BrowseEmployee" Screen.
Step 13
The Screen Designer for the BrowseEmployee Screen appears.
Step 14
In the Screen Designer, open the "Rows Layout" | "Contact List" node, and then choose the "Add" Button.
Step 15
The Add button dialog box appears on the screen.
Step 16
In the Add Button dialog box, in the showTab list choose "showAddEditEmployee".
Step 17
In the Employee field enter "New Employee", and then choose the "OK" button.
Step 18
In Solution Explorer, right-click on the Application Name, and then choose "Add Client".
Step 19
The Add Client dialog box appears on the screen.
Step 20
Select the Desktop Client and click "OK".
Step 21
In the Solution Explorer, right-click or double-click on the DesktopClient to open it.
Step 22
The Add new screen dialog box appears.
Step 23
Select a New Data Screen that's named "NewEmployee" and then choose "Employee" as the Screen Data.
Step 24
In the Screen Designer, choose the "Add" node.
Step 25
Click on the "Add" option and choose "Add text".
Step 26
In the Edit Text dialog box, enter a new employee here.