Windows phone strings and localization - string

A vanilla Windows Phone device is populated with many string resources - for example 'Settings' and beneath 'Settings' lies 'location' among others. At least this is the case for the en-GB UI language. I would like to access the full list of device-loaded strings, not just for en-GB, but for every UI-supported language. That is, I'm looking for the full list of en-GB UI strings, plus their parallel translations in the full set of UI-supported languages. Can anyone help me find them? Do I need a special SDK? Does Microsoft simply 'publish' them somewhere? Or do I need to write some C# to query an on-phone assembly?

The strings used by the OS and the native apps are not available via any public method.
If you are looking to translate your app you need to translate text in context to where you use it. It is not a straight copy and paste exercise. This means you can't just reuse the translations from another source. (Unless it's the exact same context.)

Related

FPC/Lazarus component like TImageList, but for generic files?

Just like TImageList contains a collection of images, is there a similar component for generic files?
I know I can embed files as resources, but I'd like the convenience of storing different groups of files in different "TFileList" components, and to be able to retrieve files by name or by their position in the list.
Extra points if such a component allowed some sort of design time preview of the file content (just like TImageList lets you see what each image looks like, at design time).
(I come from Delphi where I wrote my own component to do the above, but before I rewrite and port the property editor and all that to Lazarus, maybe there is already something that is tried and tested...)
Thanks!
You can use pre-defined lazarus TFPGList to specialize list of the type, that you want, for example - UTF8String
But, there's no T<>List as a component, only as object.
So, yes, this feature will be useful and i can implement, if have time,
also, there's a very limited RTTI, which has been updated only a few months ago, so you can access Methods and Properties now, so FP is more systemized, than delphi pascal, but also not so enterprise-developed, which limits it to implementations for common opensource and shareware project problems.
Nevertheless, it is more stable and supported, even my friends can contribute.

Storing and retrieving files in Blockly Web

I want to use Blockly to do some calculations, and then generate text files (as opposed to exporting code to JavaScript, Python, PHP, etc.)
I can’t see an obvious way to create my own blocks to do this in Blockly, so using AppInventor (Version: nb168), I got storing and retrieving files to work, in a crude test app on my Android tablet.
In AppInventor/Designer mode, clicking Storage/File creates a “Non-visible component for storing and retrieving files. Use this component to write or read files on your device.”
Then, in AppInventor/Blocks mode, clicking the “File1” icon gives access to 7 “file type blocks”, e.g. AppendToFile, Delete, ReadFrom, SaveFile, etc.
Is it possible to create similar “file type blocks” to use in Blockly Web?
I have limited programming knowledge, so would appreciate simple answers, please.
Thanks, Pete.
Andrew N Marshall from Google/Blockly has told me this:
"This is absolutely possible ...as long as you willing to work within the browser's security restrictions. The resulting files will be need to be manually "downloaded" one at a time, rather than written directly to the user's file system.
... I would start understanding what JavaScript functions are available to you. Attempt to construct a string and save it via a download dialog...
That means the "file" contents are really just a string in memory, a JavaScript variable. We have lots of "Text" blocks that can do a variety of operations on strings. If those are enough, you'll only need one new block to identify the string variable and initiate the download process.
Otherwise, you'll need to think about what blocks you want, and how they operate. They may operate on a specific variable in the JavaScript VM, not necessary exposed as a variable to Blockly.
Either way, you'll need to learn how to create a block and a Blockly app. We have a code lab that will walk you through all the steps. You'll learn how each block generates a string of code, and in your case, that code will be related to the download code I mentioned earlier."
So I'll press on - I just wanted to be sure my goal is actually achievable before I started.
Thanks, Pete.

Kentcio v9 Smart Search Dialog with Results search mode localization

How can i localize the drop down option for the search mode? I did some digging and was able to adjust the localization for the search form labels but i'm at loss here.
The CMS Module SearchDialog.ascx call the drop down list here, but i can't see where the values come from.
<cms:CMSDropDownList runat="server" ID="drpSearchMode" CssClass="DropDownField" />
Go to the localization App and create resource strings for
"srch.dialog.AllWords"
"srch.dialog.AnyWord"
"srch.dialog.anywordorsynonyms"
"srch.dialog.ExactPhrase"
Believe those are the 4 you need.
I couldn't find official documentation that helps much with this, though there have been articles in the past on older versions. However, one trick I've used previously is to look in the ~/CMSResources/cms.resx file, find the localized string there, and add a new one with the same key to the Localization module in Kentico. That is, add a new resource string in Kentico with the same key (the naming will be different depending on your version of Kentico).
Here's the docs discussing setting up a multilingual interface: https://docs.kentico.com/display/K9/Setting+up+a+multilingual+user+interface
And here's a screenshot of the resx file:
So in your case I'd create a new resource string within Kentico called "srch.dialog.allwords" as an example and that should overwrite and take priority over whatever is in the .resx file, plus you can manage it via the Kentico admin. There may be a quicker or more reliable way to view the list of default resource strings but in my recent installs of Kentico, the list is hidden from the admin interface.
Alternatively, of course, you could manage the resource strings via various .resx files as in the documentation, but I try to manage as much of these pieces via Kentico as possible for convenience.

how to access google define feature in a batch

Suppose I have a huge set of noisy phrases. For each one of them, I want to check if it is defined by some resources by using the google define feature. Once I type "define my_phrase" to the google search box, if the retrieved results contain the definition panel (e.g. https://www.google.com/#q=define+home+cooking), I put it into my phrase pool.
I'm wondering is this possible to do this task in a batch so that I don't have to type each of the phrase manually one by one? It would be great if this could be achieved from a unix terminal but windows is also welcome!
I heard of google-app-engine but I only have a rough idea and not sure if it could help.
Thanks!
as starting point, you may try and play with the Google Custom search following API reference - Xml results
https://developers.google.com/custom-search/docs/xml_results?hl=en&csw=1#XML_Results
Be aware of:
google TOS for this service
quantity courtesy limit

Loading caption of controls from resource DLL

I am new to MFC and I need to build a multi-language application that should be able to change the language at runtime.
AFAIK the common way for internationalization with MFC is to create resource-only DLLs. But there seems to be no simple way (that means, load DLL, call some function, and MFC updates all stuff automatically or something like that) to switch resource-DLLs at runtime, right?
So I will have to update all controls and so on manually. I already managed to load strings from the string-table of a DLL but since captions of controls like buttons are stored in the corresponding dialog (if I trust my resource-hacker :)) I thought there must be a way to load them and avoid storing an additional string in the string-table manually.
Or is there another way I don't know about?
If it makes any difference...I have to use MS embedded visual c++ 4
I work on a large localized MFC project. Here is our strategy:
A dictionary of key -> localized string, specific to each language. There are a few ways to implement this, more later.
Control IDs or captions in the dialog resource are set to the key used to look up the translation
Create a base CDialog, CFormView, etc and in at init call ::EnumChildWindows. In the callback, look up the translation and replace the control's caption with the translation.
For your dictionary, you can go a few ways.
If you want to rely on the built-in localized resource selection and string tables, you have to somehow match the control to the string ID. You can carefully ensure that the control ID matches the string ID, or you can ASCII-encode the ID in the caption and then use atoi to parse the int value.
You can forgo the built-in localized string table deal and maintain your own string -> string dictionary for each language. This lets you set the caption to the non-localized string in the resource which makes layout easier (although you'll still need to test in all languages.) It will require you to do your own "dependency injection" to make sure you load up the right dictionary. You want to be able to release updated/additional languages without rebuilding the core binaries.
If you don't want to require a restart of the application (by far the easiest solution, and the one you should use IMO), you can use resource dll's and recreate the main windows when the user switches languages. That way MFC will recreate the menus etc. in the new language. New dialogs will be displayed in the new language already anyway, from the moment you've switched the resource handle around.
I'm not sure how this relates to the embedded world, my experiences are from the desktop MFC.

Resources