I'm using DbNetGrid on client-side programming. I need to change the default language to Spanish, I already ask to them in their Contact Form, and their answers are not working for me.
First, my default language in the browser is Spanish.
I tried to put this in my web.config:
<add key="DbNetSuiteCultureSource" value="server"/>
+
<globalization uiCulture="es" culture="es" />
Also in the client:
var dbnetgrid1 = new DbNetGrid("dbnetgrid1");
with (dbnetgrid1)
{
connectionString = "SamplesDatabase"
...
userLanguage = "es-ES"
...
initialize()
}
Moreover, in the call:
<script language="JavaScript" src="./js/DbNetSuite.js.ashx?userlanguage=es-ES"></script>
So, is anybody using this software? I have many problems with it, please, any idea, answer me!
I'm using DbNetGrid on client-side programming also and i had the same problem
in Arabic i tried all these some worked in some projects and other not
try this in appsetting
add <-key="DbNetSuiteVSCultureSource" value="server" />
Related
I want to display a title rendered via angular. It works fine in browsers like chrome or firefox and also in internet 9 and 10.
The ng-app is defined in the html tag.
The title tag looks like this:
<title>
{{resultListQuery.selectedPropertiesSummary}} in {{resultListQuery.geoCodingResult.locationName}}
</title>
Can anyone help me please? Do you need more informations about the app?
You can use $window.document.title to set your title without binding.
You have to use:
<title ng-bind-template="foo {{pageTitle}} bar"></title>
Alternatively you may also use ng-bind, but ng-bind-template has the additional advantage that it allows you to have multiple {{}} expressions within.
This is the cross browser solution. ng-bind and ng-bind-template would never work because they use element.text(), which never works with on IE8.
myModule.run(function($interpolate, $window) {
...
$rootScope.$watch(function() {
return $interpolate(myTitleTemplate)($myScope);
}, function(title) {
$window.document.title = title;
})
...
});
This is an elementary problem (I think), and I am embarrassed to ask it here. It may have been answered already, but I could not find it my searches.
In its simplest form, there are two check-boxes, and each CheckBox has a control (e.g, TextBox or DropDownList) associated with it. When the checked state of a CheckBox changes, the associated control must be enabled or disabled.
JavaScript function:
<script type="text/javascript:>
function enable(bValue, control)
{
document.getElementByID(control).Enabled = bValue;
}
</script>
I'd call this function as an event procedure, e.g, enable(this.Checked, "expJob") and enable(this.Checked, "itemJob"), in the HTML below:
<body>
Billable? <asp:CheckBox ID="expBillable" runat="server" Checked="false" OnCheckedChanged="enable(this.Checked, "expJob");" />
to <asp:DropDownList ID="expJob" runat="server" Enabled="true" />
<br /><br />
Billable? <asp:CheckBox ID="itemBillable" runat="server" Checked="false" OnCheckedChanged="enable(this.Checked, "itemJob");" />
to <asp:DropDownList ID="itemJob" runat="server" Enabled="true" />
The problem is that, because of the use of quotes, I am unable to specify the "expJob" parameter in the HTML. Even the use of single quotes does not work.
So the question: Will this approach work? What is the proper syntax?
What is the best way to write and use a function such as this? I am sure such function use will be required when having to iterate over the rows in a grid.
Interestingly, all the questions/answers I have seen use a control's disabled attribute. I am only able to use the Enabled attribute. Can someone explain why, and what the difference is?
You have to use the single quotes ('itemJob')
I think OnCheckChanged is a server event. Asp.net needs a handler in the code behind when you want to use this. Thats why you are getting an error. Find the correct client side event when you want to fire a client side event. Take care of firing postbacks, but default for checkbox is "no auto postback" anyway.
Please be aware that javascript is case sensitive so
document.getElementById is good,
document.getElementByID is bad (note the ID in caps is bad)
I am developing a cusom component and I would like it to support rich text fields. Possibly the same way it is done in com_content.
in the form definition I have the following field:
<field
name="description"
type="editor"
label="COM_MYCOMPONENT_DESCRIPTION_LABEL"
description="COM_MYCOMPONENT_DESCRIPTION_DESC"
class="inputbox"
filter="MyComponentHelper::filterText"
buttons="true"
/>
So basically what happens is that the editor appears as it is supposed to but the text is saved without formatting.
The MyComponentHelper::filterText method was added later after investigating com_content and copying the filterText method to my helper, but it did not work either with or without the line. I even tried to use ContentHelper::filterText but without success.
In joomla 1.5, you had to do this in the model (in function that does the saving):
$data['description'] = JRequest::getVar('description', '', 'post', 'string', JREQUEST_ALLOWRAW);
if (!$row->bind($data)) {
...
Don't know if it still exists in Joomla 1.6. Hope it helps.
OK, so this was my bad. As I have followed the tutorial MyComponenetHelper ended up as an abstract class. I made it a normal class and everything works fine.
I'm trying to do a simple localization of my app, making it support English (default) and Danish.
I've followed the MS tutorial, and I've looked at some samples but for some reason the simulator does not show the danish version when I choose danish language as the simulator language.
Here's what I've done:
Added supported culture: dk-DK;
Changed assembly info to use "English" as default.
Added the resource to app.xaml:
<Application.Resources>
<local:LocalizedStrings xmlns:local="clr-namespace:LåneRegnskab" x:Key="LocalizedStrings" />
</Application.Resources>
Added "AppResources.resx" and "AppResources.dk-DK.resx" to project with the strings.
To use the strings I write:
"{Binding Path=LocalizedResources.Title, Source={StaticResource LocalizedStrings}}"
LocalizedStrings class:
public class LocalizedStrings
{
public LocalizedStrings()
{
}
private static AppResources localizedResources = new AppResources();
public AppResources LocalizedResources { get { return localizedResources; } }
}
This all works for the english strings, but they do not change when I'm in danish mode. What am I missing here? :(
Nothing obvious wrong with your code. Try force-chance the culture in App.xaml.cs with the following code in the InitializePhoneApplication method.
private void InitializePhoneApplication()
{
Thread.CurrentThread.CurrentCulture = new CultureInfo("da-DK");
Thread.CurrentThread.CurrentUICulture = Thread.CurrentThread.CurrentCulture;
Update
Also ensure that SupportedCultures in your ProjectName.csproj file is set to support both languages, like this: <SupportedCultures>en;da-DK</SupportedCultures>
Thanks to Claus, I solved my problems (I seem to have made all the mistakes getting there) but here's all the settings that work for me.
I'm supporting English and Spanish and changing the region of the emulator to see it work.
In the .csproj
<SupportedCultures>en;es;</SupportedCultures> <-- I was being too specific on language here
I also had AppResources-es.resx <-- Rather than .es
In my GamePage.xaml
I made the mistake here of having LocalisedStrings in both source and Path.
In the App.xaml I didn't add the namespace inline, but the same otherwise.
Hopefully it's a mistake in one of these steps as it was in my case.
I struggled with the same problem and I've just found the solution. In the csproj file the node is defined by default, but I didn't noticed that and I created another one at the first lines...
So if you remove this(or set your cultures here) it will probably work.
<SilverlightApplication>true</SilverlightApplication>
<SupportedCultures>
</SupportedCultures>
<XapOutputs>true</XapOutputs>
You have to change the csproj file as in the example bellow
http://msdn.microsoft.com/en-us/library/dd941931%28v=vs.95%29.aspx
Does anyone know how to change text language from Recaptcha?
I've already tried:
<script type="text/javascript">
var RecaptchaOptions = {
lang : 'fr',
};
</script>
But it doesn't change.
For the reCAPTCHA V2 widget you can override the default interface language detection as a parameter to the javascript. See the new docs.
<script src="https://www.google.com/recaptcha/api.js?hl=fr"></script>
set your lang at last of api address (persian "farsi"):
https://www.google.com/recaptcha/api.js?hl=fa
find your language short name in https://developers.google.com/recaptcha/docs/language
Append &hl=fr to the public key.
Appending the language code to your public key work very well :
define('RECAPTCHA_PUBLIC_KEY', '__YOUR_PUBLIC_KEY_HERE__&hl=fr');
echo recaptcha_get_html(RECAPTCHA_PUBLIC_KEY);
So you can remove your JavaScript from your code. Or leave it if you use other options, but remove "lang:'fr'"
If you mean the language in the actual images that you are trying to solve, unfortunately you can't change the language of that text, at least not yet. The only thing you can change is the language of the interface (the text/prompt in the widget, etc.).
Response to comment: well, according to the docs, you seem to have it right. Is this code place in the same page where the widget appears?
The docs also say:
you need to add the following code in your main HTML page anywhere before the <form> element where reCAPTCHA appears (this will not work if placed after the main script where reCAPTCHA is first invoked)
so also make sure that this code is placed before the <form> tag which encloses the reCAPTCHA widget.
RecaptchaOptions is never working.
Another solution is to add a parametrt hl= langCode while we including the captcha script
<script type="text/javascript" src="'. $server . '/challenge?k=' . $pubkey . &hl=de">/script>
You pasted the incorrect js. There should not be a comma after lang: 'fr'. The correct code is:
<script type="text/javascript">
var RecaptchaOptions = {
lang : 'fr'
};
</script>