|
|
 |
|
|
|
| Localizer FAQ for Versions 1.0.1.2 and Earlier
ID: W3200004
|
 |
|
Installation and Getting Started
Are
there any prerequisites to installing Localizer for
ASP.NET?
How
do I add a Localizer component to my Web Form?
Licensing
When
I received my Product License Code by email it was split
over two lines - what does this mean?
I've
entered my license code but I still get a licensing
exception when I open my project
Common Problems
I've
entered Unicode text on my page (e.g. Japanese) and
when I try and save whilst Localizer is set to that
language I get "Some Unicode characters in this
file will not be saved. To save all the information
in this file, use Save <file> As and click the
arrow next to the Save button. Choose Save with encoding
to select a UNICODE encoding". What do I do?
Runtime Deployment
How
do I deploy Localizer to my webserver?
I
receive an error like 'File or assembly name Localizer,
or one of its dependencies, was not found.' when I run
my application. What is missing?
General Programming Issues
How
do I programmatically set the displayed language/culture
at runtime?
|
 |
 Installation
and Getting Started |
|
Are there any prerequisites for installing
Localizer for ASP.NET?
You need the .NET runtime Release 1, and Visual
Studio 2002 or above. When installing you must be logged
in as an Administrator.
How do I add a Localizer component
to my Web Form?
You must be logged in as an Administrator when you install
Localizer. After the installation process has completed
you will need to add the Localizer component to your
Toolbox in Visual Studio.NET using the following procedure:
1) Open the Visual Studio .NET editor.
2) Right click on the 'General' tab of the Toolbox,
and select 'Customise Toolbox...'. (You may alternatively
add it to the Web Forms tab, or create a new tab).
3) Select the '.NET Framework Components' tab of the
Customise Toolbox Dialog and scroll down until you find
'Localizer'; check this and click OK.
You should now be able to drag a Localizer component
from the General Tab of the Toolbox onto your WebForm's
component tray.
|
 Licensing |
|
When I received my Product License
Code by email it was split over two lines - what does
this mean?
The product license code you have received is valid,
but can sometimes be wrapped onto a second line when
displayed in your email program. You must treat both
lines of the key as a single block. If you accidentally
only entered part of the code into Localizer during
the installation process you can manually enter it again
by going to the Start Menu > Localizer for ASP.NET >
Register Localizer. Then we recommend you cut and paste
the first line from the email into the textbox then
cut and paste the final part of the key from the second
line on the end - make sure there is no space between
them. (See also item 1 below if
you are using Outlook XP - it may be corrupting the
text in your email).
I've entered my license code but
I still get a licensing exception when I open my project
If after installing the full version of Localizer
and entering your Product License Code (see registration
faq) you still get a licensing exception when you
open a Web Form containing Localizer or CulturePicker
it is most likely due to one of the following:
1) You may be reading your email using Outlook XP. There
is a bug in Outlook XP (MSKB:Q287816)
which causes the Product License Code line to become
corrupted. To resolve this click on 'Format-Unwrap Text'
on the menu bar, or click on the link at the top of
the email that says 'Extra line breaks in this message
were removed. To restore, click here', and try entering
the License Code again.
2) There is a bug in Visual Studio .NET 2002 causing
this kind of problem with projects or solutions that
have spaces in their names. Make sure your solution
and project names don't contain any spaces.
3) Visual Studio .NET sometimes caches invalid licensing
information (ie it may still be using the Trial version
license). To resolve this close all the windows in Visual
Studio .NET and do a rebuild all of your project.
4) If none of the above succeed you can try deleting
the .licenses file associated with your project. This
can be found in the obj\Debug or obj\Release folder
underneath your project folder. Alternatively you can
just delete the obj folder altogether as it will
be regenerated when you do a rebuild.
|
 Common
Problems |
|
I've entered Unicode text on my page
(e.g. Japanese) and when I try and save whilst Localizer
is set to that language I get "Some Unicode characters
in this file will not be saved. To save all the information
in this file, use Save <file> As and click the
arrow next to the Save button. Choose Save with encoding
to select a UNICODE encoding". What do I do?
Visual Studio is telling you that you have typed UNICODE
characters into a page which is currently saved in an
ASCII text format. There are two solutions to this:
1) Ignore it... since Localizer is now storing the text
from the page in the .resx files, it doesn't really
matter what is stored in the html of the .aspx file
for the properties that have been localized - because
Localizer will be replacing this text at runtime (and
designtime) anyway. So you can choose to ignore the
warning, and just switch Localizer back to the Invariant
Culture (Default) before saving. This may be the appropriate
solution if you have already put his file under source
control as a (non-UNICODE) text file, or you're working
with a wide range of conflicting UNICODE encodings.
2) Save in an appropriate encoding... follow the instructions
to save in a UNICODE encoding that encompasses all of
the Cultures you are working in, if possible. This may
mean, if you've already put the file under source control,
that you have to change its file type from text to binary
in your source control tool.
|
 Runtime
Deployment |
|
How do I deploy Localizer
to my webserver? or
I receive an error like 'File or assembly name Localizer,
or one of its dependencies, was not found.' when I run
my application. What is missing?
If you use Visual Studio's 'Copy Project' option on
the Project menu, all your project files will be copied
but the localizer dll itself will not. You will need
to copy this manually. It is usually located at: C:\Program
Files\TMG Development Ltd\Localizer for ASP.NET\bin\Localizer.dll,
but you can check this by looking at the Path property
of the Localizer reference in your project.
The Localizer dll should be copied to the bin folder
of your deployed web application.
NOTE: you do not need to enter any licensing information,
or run the Localizer installer on the server - copying
the Localizer.dll to the bin folder is enough.
|
 General
Programming Issues |
|
How do I programmatically
set the displayed language/culture at runtime ?
You must set the Thread's CurrentCulture and CurrentUICulture
properties in the Page Load event (or immediately before
the call to Localizer.Localize() if you're localizing
manually) follows:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim userCulture As String = "fr"
If userCulture <> "" Then Dim ci As New System.Globalization.CultureInfo(userCulture) If (Not ci.IsNeutralCulture) Then
' only set the CurrentCulture if this is a 'specific culture'
System.Threading.Thread.CurrentThread.CurrentCulture = ci
End If
System.Threading.Thread.CurrentThread.CurrentUICulture = ci
End If
End Sub
|
|
|
|
|
 |
|