Click here to Skip to main content
15,884,629 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a plain-vanilla ASP.NET web application that I need to globalize/localize. I can successfully do this using .resx file and explicit localization in my .aspx files. I would like to distribute my localized strings in the form of satellite assemblies rather than as .resx or .resources files.

When using satellite assemblies, I can easily access the resource strings from the code-behind, but have been unsuccessful in getting the explicit localization expressions in the .aspx files to access the resources from the satellite assemblies.

I have yet to find any examples or guidance which speak directly to explicit localization via satellite assemblies, and have been banging my head against the wall on this one for about two weeks.

My question is a simple one - is it possible to use satellite assemblies with explicit localization expressions in an aspx page such as this? If yes, can someone point me towards a working example?

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="twa.aspx.cs" Inherits="twa.WebForm1" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
    </div>
        <asp:Label ID="Label1" runat="server" Text="<%$ Resources:twa, Label1Text %>"></asp:Label>
        <br />
        <asp:Button ID="Button1" runat="server" Text="<%$ Resources:twa, Button1Text %>" />
        <br />
        <asp:TextBox ID="TextBox1" runat="server" Text="<%$ Resources:twa, TextBox1Text %>"></asp:TextBox>
    </form>
</body>
</html>


What I have tried:

Just looking for an answer as to the feasibility of this approach.
Posted
Updated 26-Jun-17 21:56pm
v2

1 solution

 
Share this answer
 
Comments
thehallux 27-Jun-17 8:33am    
Thanks, but I went down the road in that string and ended up at the same place as the person who posted the question at the start of that thread - the resources are not accessed from the .aspx page.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900