I googled a lot and did these changes to my project:
.csproj:
<SupportedCultures>
en-US;de-DE;ru-RU;
</SupportedCultures>
WPAppManifest.xaml:
<DefaultLanguage xmlns="" code="en-US" />
<Languages xmlns="">
<Language code="en-US" />
<Language code="de-DE" />
<Language code="ru-RU" />
</Languages>
And of course I have AppResources.de-DE.resx, AppResources.en-US.resx, AppResources.resx and AppResources.ru-RU.resx.
When I set the phone to russian, the app starts in russian as expected. But that doesn't work with german. I checked the AppResources-files many times. It's all in there, they should work. but somehow de-DE doesn't get recognized.
Tried the same with simple "en;de;ru;" with the same result.
Any ideas?
Edit:
I found this tutorial: http://www.silverlightshow.net/items/Windows-Phone-8-Localization.aspx and they also use "de". So I changed all appearances of those strings to "de", "en" and "ru". Still russian works, german appears as english - the default language =/
Okay, stupid, but it was in the project's properties. For some reason the defaultlanguage was set to german.
Still think that it's in confusingly many places. I'll summarize them for everybody who might need it in the future:
project's properties, 1st tab "supported cultures" and "asseblmy information" button!
WPAppManifest.xaml view Code
AppResources.xx.resx
inside AppResources files the "ResourceLanguage"-tag should be set to "de", "en", "fr" or whatever.
That's many places and I hope I didn't forget one O-o
Related
My goal is to have a html textarea tag which spell checks in 2 specified languages. The lang attribute is great for spell checks in 1 language but I can't find any way to spell check in more languages. I have found this "Use enhanced spell check" option and it would be great if I could turn it on for every guest on my website. Or maybe there is some other way to add second language to spell check?
Thanks!
Enhanced spell check
Update
It turns out that two languages together can be confusing. For example the Latin word "fortus" gets flagged:
So I don't know if it's such a good idea to do this. You can't even change the default language, let alone two.
Original Answer
I don't think you can do this.
Spellcheck is widely controlled by the browser, and some basic browsers still don't have it. Other than turning it on or off, you don't have much control over the language used or if enhanced spell check is on.
And see, Edge doesn't even have enhanced spell check:
You can develop your own spell check instead.
Here's a rudimentary example:
const words = ['one', 'two', 'three'];
$('#enter').on('input', function() {
document.getElementById('m').innerHTML = '';
this.value.split(" ").forEach(function(v) {
if (!words.includes(v)) {
document.getElementById('m').innerHTML += "<li>" + v + "</li>";
}
});
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<label>The dictionary is only trained to recognize "one", "two", and "three". Type anything else and it will get flagged:<br />
<textarea id="enter"></textarea></label>
Misspelled words:<ul id="m"></ul>
However, the caveat with that is that you can't make it look native for every user.
Here's how Firefox flags misspellings:
And here's Edge:
One's spikier than the other. This isn't so large of a difference, but it shows how different browsers have different spellcheckers.
So I am working with an API, and found this in the documentation:
let message = {
"text" : "<i>or</i> HN: the Next Iteration<p>I get the impression that with Arc being released a lot of people who never had time for HN before are suddenly dropping in more often. (PG: what are the numbers on this? I'm envisioning a spike.)<p>Not to say that isn't great, but I'm wary of Diggification. Between links comparing programming to sex and a flurry of gratuitous, ostentatious adjectives in the headlines it's a bit concerning.<p>80% of the stuff that makes the front page is still pretty awesome, but what's in place to keep the signal/noise ratio high? Does the HN model still work as the community scales? What's in store for (++ HN)?",
"time" : 1203647620
}
So in react (using function component), what is the proper way of rendering message.text? I am asking because my rendering output still has the tag <i></i> and <p></p> in the text when I return {message.text}. So I guess there is something wrong.
If you want to render a string containing html you can use dangerouslySetInnerHTML
In your case will be:
<div dangerouslySetInnerHTML={{ __html: message.text }} />
Watch out using this attribute because it could expose your app to XSS attacks. (check https://reactjs.org/docs/dom-elements.html#dangerouslysetinnerhtml)
I am just developing an XPage Widget with a manifest extension.xml.
<?xml version="1.0" encoding="UTF-8"?>
<webcontextConfiguration version="1.1">
<palleteItem title="XWidget" viewImageUrl="" url="notes://venus/xxx/Dev/Source/CC/CC_40_DEDE_SRC.NSF/streamCC.xsp?
OpenXPage&1536921419?OpenXPage=null" singletonSidebar="false"
providerId="com.ibm.notes.toolbox.provider.XPagesPalleteProvider" imageUrl="" id="1385849393" hideThumbnail="false"
contributeToSideshelfOnStartup="true" contributeTabOnStartup="false">
<preferences/>
<data/>
</palleteItem>
</webcontextConfiguration>
I have already researched the meaning of the different parts. Only the parameters of the URL "notes://venus/xxx/Dev/Source/CC/CC_40_DEDE_SRC.NSF/streamCC.xsp?OpenXPage&1536921419?OpenXPage=null" are not clear to me.
It seems to be a bug during URL generation, but the bug has no consequences.
The URL parameters are splitted into two elements:
OpenXPage
1536921419?OpenXPage=null
While the meaning of the first parameter should be clear, the second one is to prevent caching (but is useless when "hardcoded" like in bookmarks)
1536921419 is a unix timestamp to prevent caching.
GMT: Friday, 14. September 2018 10:36:59
?OpenXPage=null
Looks like a simple coding error. "Add ?OpenXPage=[value] if URL parameter OpenXPage is null or empty".
I'm unable to build a VB.NET site I've inherited due to a nebulous error.
Without a clue as to what might be causing it, I turned the hounds of the Czech Republic loose on it (otherwise known as Resharper). It ended up showing me 20 errors and upwards of a thousand other "issues" with the solution:
Okay, so I'm going after the errors first; ASP Errors first. The first one pointed to this:
<telerik:RadButton ID="ExportButtonRad" DisabledButtonCssClass="rbDownload' UseSubmitBehavior="false" EnableViewState="false" AutoPostBack="true" CommandName="ExportToExcel" Skin="Default" Visible="false" OnClientClick="document.body.style.cursor = 'wait';" ButtonType="StandardButton" HoveredCssClass="goButtonClassHov" ToolTip="Export" runat="server" Text="Export">
...and flagged the following portion:
UseSubmitBehavior="false"
...as an "Unexpected token"; so I removed that, and re-ran the Resharper > Inspect > Code Issues in Solution.
Now there are more (not less) ASP Errors, and that same element ("ExportButtonRad") is red-flagged again for the same supposed infraction ("Unexpected token"); this time EnableViewState="false" is the culprit or scapegoat.
So I'm afraid that if I remove that, I will have 11 ASP Errors and it will finger some other property set to false as being bogus. I have suspicions this is not the real problem. Does anybody know about any "gotchas" with this that might be the underlying cause of this whack-a-moliation?
I think the problem will be this:
DisabledButtonCssClass="rbDownload'
Equalise the quotes.
DisabledButtonCssClass="rbDownload"
Was hoping code lines like this will work on WinRT:
<!--A RichTextBox with hyperlink.-->
<RichTextBox IsReadOnly="True">
<Paragraph>
Displaying text with <Hyperlink NavigateUri="http://www.msdn.com" TargetName="_blank">hyperlink</Hyperlink>.
</Paragraph>
</RichTextBox>
The end result I'm looking for is to turn this:
Hey #Jake
to this:
Hey Jake Dawson, how are you.
Once the user hits space after the #word.
Since you want to set it to IsReadonly="True", why don't you use a RichTextBlock?
See http://msdn.microsoft.com/library/windows/apps/br227565
If you are only after the ability to include a hyperlink, you can do that in a regular TextBlock as well (in Windows 8.1), see http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.documents.hyperlink.aspx
UPDATE:
After your clarification of the question, it seems that you do need an editing capability. Look at
http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.controls.richeditbox.aspx