IIS globalization and Spanish (Latin America) es-419 - asp.net-mvc-3

IIS does not handle the "es-419" correctly. Is there a workaround to get it to work? I am using the following to get the Thread local uiculture set.
<globalization uiCulture="auto" culture="auto"/>
That works fine for all the locales i have tried except for "es-419" which is common from Chrome browsers. If "es-419" is in the list it just uses the default local instead of es.

See if this helps you out to create a custom culture, since the numbered cultures aren't supported.
How to: Create Custom Cultures

Related

Can't change language in Steam API

There is Steam API endpoint, fetching APP detailed info, for example:
https://store.steampowered.com/api/appdetails?appids=578080
And it can take just a few parameters:
appids - id of the app
l - language code
cc - currency code
filters - filter results to some particular part, for example filters=price_overview
Everything was working fine until I broke it )))
I started to investigate, which languages are supported and passed a few language parameters:
https://store.steampowered.com/api/appdetails?appids=578080&l=en
https://store.steampowered.com/api/appdetails?appids=578080&l=ru
https://store.steampowered.com/api/appdetails?appids=578080&l=fr
https://store.steampowered.com/api/appdetails?appids=578080&l=es
https://store.steampowered.com/api/appdetails?appids=578080&l=de
And at some point it just stopped switching languages and stuck on English (as default) or German, if I put any other parameter, rather than "en".
"cc" is working and I can switch currencies.
"filters" are working.
But language has stopped changing.
I even tried with different IP's, from my own PC, from my web server and some PHP sandbox services - same thing. The only difference is that sometimes it's stuck on English all the time.
What the heck?
Found an answer.
You have to write full language name, eg: l=english, l=german, l=spanish, l=russian, not just l=en, l=de, l=es or l=ru.
Don't know why it worked before.

How to generate localized report in JasperReports Server?

I've created a jrxml report file. I've added the resourceBundles (pl_PL, en_GB and en_US and the default one also in english) named test.properties, test_pl_PL.properties and so on. And I have added resourceBundle="test" propertety to the tag. I've deployed the report and all related resources.
I am generating my report through rest API v2, namely:
http://localhost:9000/jasperserver/rest_v2/reports/reports/test_summary.pdf
How do I steer in which locale the report is generated? I've tried the Accept-Language in the header (through postman), also I've tried Chrome extensions and Firefox and Opera for all these clientes the report is generated in pl_PL. The only exception is edge browser in which the report is generated in english (default) locale.
Try to pass Locale via userLocale parameter in URL. Like this:
http://localhost:9000/jasperserver/rest_v2/reports/reports/test.pdf&userLocale=pl_PL
Well, many years after initial question, but anyway: report itself has an embedded parameter REPORT_LOCALE. You could set it as usual, trough URL. Example:
https://example.com/jasperserver/rest_v2/reports/folder/Invoice.pdf?REPORT_LOCALE=bg_BG&InvoiceId=2

URI scheme launching

I've been given a task to create a protocol similar to callto:, that - upon clicking on a link with it - would automatically launch an installed aplication.
I followed the microsoft guide on how a scheme should look like.
My scheme looks like this:
HKEY_CLASSES_ROOT
slican
URL Protocol = ""
DefaultIcon (Default) = "C:\Users\Okabe\Desktop\slican\SlicanP.exe,1"
shell
open
command (Default) = "C:\Users\Okabe\Desktop\slican\SlicanP.exe" "%1""
I thought that was all and tested it with
test link
test telephone link
There was no reaction whatsoever. Internet Explorer asked me if I want to search for a program that can open the content and Chrome responded with nothing, as if I clicked javascript:void(0).
How to get that worked?
Thank you for your help!
The registration you show works perfectly fine for me when I try it on Windows 7. The local app I registered in place of SlicanP.exe ran fine when I invoked a slican: URL from the Start | Run menu, and from within the address bar of Windows Explorer. So the registration works.
Do be aware that Internet Explorer runs in a lower integrity security context, so it may not have rights to run local programs. When I tried to click on an HTML link to a slican: URL, or type a slican: URL in the address bar, IE had trouble executing the local app (even after prompting for permission). I had to run IE as an administrator, then the local app ran just fine.
Also, you really should not be creating a HKEY_CLASSES_ROOT\slican key directly. Create a HKEY_CURRENT_USER\Software\Classes\slican (current user only) or HKEY_LOCAL_MACHINE\Software\Classes\slican (all users) instead. Refer to MSDN for more details:
HKEY_CLASSES_ROOT Key
Merged View of HKEY_CLASSES_ROOT
Update: Since it works in Windows 7, Microsoft probably changed how URL schemes are registered in Windows 8. For instance, phone/store apps use URI activation:
URI activation (XAML).
URI activation (HTML)
The documentation says there are two ways to register a custom URI scheme:
Internet Explorer uses two mechanisms for registering new pluggable protocol handlers. The first method is to register a URI scheme name and its associated application so that all attempts to navigate to a URI using that scheme launch the application (for example, registering applications to handle mailto: or news: URIs). The second method uses the Asynchronous Pluggable Protocols API, which allows you to define new protocols by mapping the URI scheme to a class.
You are doing the first. Try using the second instead.
However, I just noticed that "Asynchronous Pluggable Protocols" is listed on MSDN in the "Legacy APIs" section, and it has the following note:
Third-party protocol implementations won't load in Windows Store apps using JavaScript, or in the Internet Explorer in the new Windows UI.
So it may or may not work in Windows 8.
Update: I just found this:
Guidelines for file types and URIs
In Windows 8, the relationship between apps and the file types they support differs from previous versions of Windows.
Walkthrough: using Windows 8 Custom Protocol Activation
The file type and protocol association model has changed in Windows 8. Apps are no longer able to programmatically set themselves as the default handler for a file type or protocol. Instead, now the user always controls what the default handler is for a file type or protocol.
Your app can use existing protocols for communication, such as mailto, or create a custom protocol. The protocol activation extension enables you to define a custom protocol or register to handle an existing protocol.
Also have a look at this:
Setting mailto: protocol handler programmatically in Windows 8
And this:
Default Programs
if you go to C:\Users\\AppData\Local\Google\Chrome\User Data
You can edit the Local State file
Search for protocol_handler
The syntax here is a key value pair. I usually copy two mailto: and make sure that you set your protocols to false. This will mean that chrome will treat your new protocols as URI_Handler events
If you have troubles with configuring custom URI scheme, you can compare your own configuration with existing one. For example, "HKEY_CLASSES_ROOT/mailto" - most likely you have it already in your system.

Internet Explorer 11 has null recordset

I have a classic asp app that uses XML data binding. With the IE9 emulation setting it works fine up through version IE10. But in IE11, the recordset is always null. The values, however, are bound correctly to the input fields using #DATASRC and DATAFLD. It's just when I attempt to access a particular record via recordset.absolutePosition, it bombs.
Since data binding seems to be functioning, surely there must be a way to specify a particular row of the data.
The datasrc and datafld APIs have been removed in IE11 partly for security reasons:
Example: The following use of data binding will result in the execution of script within IE:
<xml id=cdcat><note><to>%26lt;span style=x:exp<![CDATA[r]]>ession(alert(3))%26gt;hello%26lt;/span%26gt;</to></note></xml><table border=%221%22 datasrc=%22%23cdcat%22><tr><td><span datafld=%22to%22 DATAFORMATAS=html></span></td></tr></table>
Note there is no SCRIPT tag present. There are many similar obscure script execution techniques present in all browsers.
Use the following resources to create an alternative:
How to: Implement Property Change Notification
Migrating mutation and property change events to mutation observers
IE8 XSS Filter design philosophy in-depth

Manual Url Culture Rewriting in DotNetNuke Request

I'm working with dotnetnuke 7.
I'm not using any rewriting modules and don't want to use them.
When content localization is enabled, url has the following view:
my_training_host/en-us/my-page.aspx
I want to change manually the display url so, that instead of full culture in query, the two letter culture (neutral culture) will show:
my_training_host/en/my-page.aspx
Does anyone have similar problem ?
If you ever change your mind about using a rewriting module, UrlMaster is the module for that. If not, then DNN 7.1 now adds support for creating url providers as extensions. More details at http://www.dnnsoftware.com/blog/cid/154604/Introducing-DNN-Extension-URL-Providers
I am using Open URL Rewriter for DNN - it does exactly what you ask for with it's default installation - no further config required.
And it's open source in comparison with UrlMaster.
In case of you use version 1.3.1 of Open URL Rewriter with DNN 7.04 to get two letters only for multilingual sites you have to make sure:
you create site aliases for each language with the two letter part you desire and
enable those entries as primary aliases (you need one primary alias for each language), for example for two languages (en & fr) you need to set three primary aliases like the following:
✔ www.yourdomain.com
✔ www.yourdomain.com/en us-US
✔ www.yourdomain.com/fr fr-FR

Resources