Make App available for different languages - windows-phone-7

I finished a new WP7 app and I made it possible to switch to different languages via custom code.
I'd like to add English and French, currently it is only set to German.
When I try to submit it to the marketplace, I only have the option to fill out the german info, but how can I declare my app to be also available in EN and FR?

See the HowTo: on MSDN.
The idea: If you have resources for supported languages, you need to declare them in .csproj file
<SupportedCultures>de-DE;fr-FR;us-EN;</SupportedCultures>

Thanks to Anton I came to the solution:
If you end up like me, do this to add different language support for your app manually (without filling out resources):
Create new resource items in your project and call them AppResources.en-GB.resx etc. It should fit to the syntax. You don't need to fill out or explicitly use those resource files.
After that, you go to your .csproj file of your project and add (see above posts) those language infos into it. Then, you'll see that the marketplace recognizes those languages.

Related

Menu-commands extension for Visual Studio without command-table

I am building a Visual Studio extension (VSIX) with menu commands depending on the options for the extension. Its dynamic, what commands (how many) depends on the options.
I have a solution for it that uses the command-table, like: Dynamically add menu items
I would like to skip the command-table and build the menus totally programmatically, like: HOWTO: Package with commands created by code
The reason is to make it more dynamic. So if the user adds/changes/deletes in the options of the extension it would be handled dynamically (programmatically). On saving options the menu-command tree would be rebuildt. If I use a command-table I will have to add/delete nodes there to be able to solve it.
The thing I can not figure out is howto add the objects for "groups" and "menus" programmatically.
So I am out for the class/interface that has "AddGroup" or "AddMenu" as methods.
Is this at all possible or do I have to use the command-table? If it is possible I would appreciate links to code-examples for it.
Regards Hans
MVP Carlos Quintero has published sample code using IVsProfferCommmands3.AddNamedCommand that illustrates how to programmatically add menu items via the automation services (formerly utilized by the now discontinued add-in extensibility model).
https://github.com/visualstudioextensibility/VSX-Samples/tree/master/PackageCommandsCreatedByCode
While add-ins are no longer supported, the automation interfaces are still present. So you can use these, bearing in mind these menu items (aka commands) are temporary.
Also, the sample code here is a little outdated, using Package instead of AsyncPackage, and ProvideAutoLoad attributes. So you'll also want to read up on the following:
https://github.com/microsoft/VSSDK-Extensibility-Samples/tree/master/AsyncPackageMigration
https://devblogs.microsoft.com/visualstudio/updates-to-synchronous-autoload-of-extensions-in-visual-studio-2019/
Sincerely,

Possible to include an image in the meta data in code? VS 2013

I would like to be able to include a screenshot of a control inside my code, this way making control identification easier for new members on my team, is such a thing possible?
Maybe even the ability to just have the image on a network share with the path in a comment, and then have a plugin that when hovering over the link brings up the image?
EDIT (More detail):
I'm creating a test project, the application under test has over 1000 controls, some of them are similar in name and purpose, this can make it difficult at times for developers to reuse the API I am creating because the control name is simply not enough for quick identification of the control in use.
I use the word API very loosely too, none of this stuff will be consumed in web services, and it will always be white box with developers including a project reference and have direct access to the source code.
For every form in my application (The test one), I have a controls.cs file where all the controls for that form in the application under test are listed - This is where I want the hover to screenshot ability in the control definitions.
Another sure factor is that all developers will be using VS2013 (For now the base version), later this could be update 1 or 2.
As the initial author and senior developer on this project, these hover / image references (in the code) will be as useful to me personally as any 3rd party developers, or any later developers to join the initiative.
Thanks again, and I added a bounty!
I believe you can use Whole Tomato's free SourceLinks Visual Studio extension to do what you want - or at least get pretty close to it.
Built-in Functionality:
Out of the box, the extension allows you to specify comment patterns you want users to be able to take an action on. Once the patterns are specified, SourceLinks will highlight any occurrences of those patterns in the text editor. You will be able to double click the highlighted items and perform a pre-configured action (such as opening a link in an internal/external browser, or launching an executable).
You can see an example in the SourceLinks configuration dialog shown below:
(source: wholetomato.com)
So you could use this feature pretty painlessly to define a keyword such as Control Image and then put comments like the following in your code:
// Control Image: my_smart_list.jpg
SourceLinks would allow you double click this text, and you could have that configured to launch the image (using a file:// or http:// url depending on how and where your images are stored) either inside Visual Studio in it's internal browser, or in an external browser.
Custom Tooltips!
Now, if you want to put in some more effort into this and actually write some code, then SourceLinks allows you to create API Extensions to display custom tooltips when the user hovers over the marked text in the editor. The default installation of SourceLinks comes with sample API extensions that you can copy to create your own. See the article linked at the very top of the answer for more details on these samples.
This post in the SourceLinks forum informs us that SourceLinks expects the custom API Extension to return the tooltip value as FlowDocument XAML text. This is awesome news for us, because a FlowDocument can contain many types of elements, including formatted text, hyperlinks, and images.
Imanges in a Flow document can be specified both inline as well as externally.
Hope this helps!
I would use doxygen -- create the images somewhere in the source tree and use doxygen comments. You can embed the \image command in source comments (see docs) and doxygen will generate all the HTML documentation from there. I think doxygen is a great tool for documenting a codebase as you can generate the documentation directly from comments in the source and distribute or host the HTML separately.

Where to find the tags used in theme short codes? As well as the general tags used in pyroCMS?

I was wondering where to find the tags to type to take advantage of shortcodes programmed in themes. Many themes have them, such as the one below. However I can never find the information required to make use of them in the read me's or on site documentation. Which makes using them impossible for me. Is there a specific html, css, or php file that is consistent to each theme and shows them?
Given the lack of write ups on what tags to use suggests that theme creators expect people to know which file to find them in.
https://www.pyrocms.com/uploads/default/store/listings/11-25-2012_9-41-20_PM.png
https://www.pyrocms.com/uploads/default/store/listings/11-25-2012_9-41-20_PM.png
On a more PyroCMS rather than theme specific note, is there a list of all tags and their uses? Such as {{ settings:site_name }}, or the page body tag. Every link I have found to a list says that the list has been moved.
Thank you for your time once again.
Open up your file directory and navigate to:
path/to/your/files/system/cms/plugins/theme.php
Each one you can use is listed here along with an example in the function description. Each plugin in this folder is lined out the same way (files, session, asset, etc). You should be able to view each one and play with how to incorporate them into your project.
Edit: Also, you can find more information here: http://docs.pyrocms.com/2.1/manual/plugins
Notice that this is specific to version 2.1. If you are not using 2.1, in the top navigation add click on documentation and then select your version.

Specify the language of the app in the marketplace?

I just tried to submit my new Windows Phone 7 app to the Market Place and realized that apparently I have set English as my project language instead of German. In the app hub application submission walkthrough - step 2 it says
Provide the following information to submit your application. You'll repeat these steps for each language that your XAP package supports.
And in the next page as the only "supported language" English is shown.
How can I put German instead?
Thanks
PS: Does it even matter? What if I just provide a German description even though it says English?
Your changing the native language of the app. Open properties of your project, get the assembly info and you should see a list of languages (I'm not exactly sure as dont have VS on this machine).
The other option is to add / change the NeutralResourcesLanguageAttribute in the assemblyinfo file. The new version would look like:
[NeutralResourcesLanguageAttribute("de")]

multilingual application in WP7

I have an application in Windows Phone 7.0 and now I want to make it multilingual supporting both English and French languages.
Could anybody guide me through the approach I should follow for supporting it in multilingul.
Thanks
SAM
The recommended approach is to expose any ResourceManager instances as XAML Resources (via a wrapper class, since the resources are only available at runtime). You can then bind to the properties of the strongly typed ResourceManager in XAML.
Here is some documentation that might help:
How to: Build a Localized Application for Windows Phone
Globalization and Localization for Windows Phone
And some other resources to help:
PhoneCommonStrings contains strings commonly used in WP7 applications, localized to all available languages (disclaimer: I'm the author of the library)
BindableApplicationBar allows you to bind the text (and command) of your application bar buttons
Look at my blog: I just wrote about this very subject a couple weeks ago. It gives you step-by-step instructions.
Basically:
Create the project
Edit the .csproj file in notepad to add the desired cultures to the tag.
Select a neutral culture in the project's properties
Add Resources to the project in Solution Explorer
Create a class to access those resources
Add that class to the tag of the App.xaml file
Put your strings into the Resources file
Bind to those strings using the resource binding in your xaml.
If using an ApplicationBar, you must do so in code, as it cannot be bound in xaml.
Create another resource file for each supported culture.
Create dll files for each supported language, so the title will be correct on the tile and program list.

Resources