Custom Control with Localization Support in WP7 - windows-phone-7

I have created the DateTimePicker control. Now i want to add localization Support with this.
I have followed the below steps.
Created CustomControls.de-DE.resx inside the ResourceFolder.
added some commonly used strings in that resx file
changed the access modifier to Public
added <SupportedCulture>de-DE;</SupportedCulture> in the csproj file.
set System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("de-DE"); in sample.cs file before
IntializeComponent().
my DateTimevalue was " 2 Day(s): 3 Hr (s): 5 Min(s) : 32 Sec (s)
Getting only default language that is english.
What i did wrong? Please help me anyone. Is anything i missed?

Clear Steps To add Localization Supports in WP7
Create Custom control.
Add AppResource.resx inside Properties
Add AppResource.es.resx and Appresource.it.resx files inside Properties
Add needed strings with unique name.(we can refer the strings use of this id).
Add it;es; in the csproj file.(unload the project, rightclick->edit, add the supportedculture
tag then reload it)
Create the Sample
do the same as 5th step for Sample.csproj file
Change the cultures of System in the button click.(Ex: Thread.CurrentThread.CurrentUICulture = new
System.Globalization.CultureInfo("de-DE");)
Run the Project
Ref: http://www.windowsphonegeek.com/articles/Localizing-a-Windows-Phone-app-Step-by-Step
Thankyou.

Related

XCode: Additional localization of only one button

After a long long time, I added another button to my apps dialog. I had localized strings implemented. So I found a similar one like
/* Class = "NSButtonCell"; title = "Keep number"; ObjectID = "2yE-rM-5Sn"; */
"2yE-rM-5Sn.title" = "Nicht umnumerieren";
in file "Main.strings (German)". Unfortunately I forget, how I got there. I did the entire translation in one step in one night. Now I only need to get one new translation for the newly added button.
Any hint how to do this?
Select your project name (1.), in my case Timebooking. Maybe the application is selected instead in Targets and you have more options but not localization. Then select Use Base Localization (2.). It should create the English Main.strings file when you add English. There you can add the proper translation. HTH.

Change sapui5 fileuploader browse button text

I'm looking for a way to change sapui5 language at runtime based on the loggedin user language. I have the i18n properties file in place. The challenge that I'm facing is to change the text on the FileUploader button. This text is not being picked up from the properties file. It is always 'Browse'
I'm using sap.ui.commons.FileUploader()
var FileUploader = new sap.ui.commons.FileUploader({
id: "fileUploader_id",
fileType: "zip",
uploadOnChange: false,
buttonText: oBundle.getText(FILEUPLOADER_BUTTON_TEXT),
tooltip: oBundle.getText(FILEUPLOADER_BUTTON_TIP),
});
Similar problem with the table when there is no data. The table displays 'No data' in english instead I want it to be in a user specific language.
The "buttonText" property from sap.ui.unified.FileUploader is not working?
I just gave it a try to see and the button's label changed accordingly.
<u:FileUploader buttonText="{i18n>browseText}"></u:FileUploader>
In older versions of SAPUI5 (using commons library), the button Text can be changed by overwriting the standard buttonText parameter. i.e., in this case the standard "FILEUPLOAD_BROWSE" has to be overwritten in the local i18n.properties file. We cannot use the name that suites us (like FILEUPLOADER_BUTTON_TEXT).

How to add a user defined control to a form in VFP

Hi: I have created a very simple user defined control (a container) with the visual IDE of Visual Foxpro 9 and stored it into a VCX file (sisweb.vcx)
After that I've created (visually) a form and in the INIT event I've tried to instantiate the previous container control and add to the form:
oContainer=newobject("xContainer","sisweb.vcx")
ThisForm.AddObject("Contx","oContainer")
ThisForm.Contx.Width=230
Unfortunatelly, when trying to ADD the container object, it rises an error saying that oContainer doesn't exists.
Can you help me please?
When you want to add an object dynamically at run-time, you could do something like
Thisform.NewObject("Contx", "xContainer", "sisweb.vcx")
Thisform.Contx.Width = 230
Thisform.Contx.Visible = .T.
Where assigning the Visible property explicitly is important.
On the other hand, you could also add it "visually" in the Designer by dragging it from the Project Manager's "Classes" tab, or by using the bookshelf icon of the Form / Class Designer's "Controls" toolbar, or the "Toolbox" in the "Tools" menu

Allowing user selected Global Theme for winform app

I am using DevExpress controls in a winform app I am building for internal use. My app has about 30 forms in total and I am trying to figure out a way to allow my user's to select a theme. I have seen this mentioned here at SO multiple times in answers to other posts.
I understand how the StyleController works, I believe, but what I am wondering is how I can use 1 Style controller for the whole app.
Right now I am trying to create 1 StlyeController at the Shell form and then pass a reference to it to each child form. From there I then have to programatically set the StyleController property for each control. I don't mind I just wonder, especially from those who have done this, if there is a simpler way?
It is very simple. This example is assuming that you are using skins.
In the constructor of your main form calls:
DevExpress.Skins.SkinManager.EnableFormSkins();
This will enable your form to use the current skin. It is also important that each of your forms derived from XtraForm.
After that you need to setup the global look and feel object for your application:
//This set the style to use skin technology
DevExpress.LookAndFeel.UserLookAndFeel.Default.Style = DevExpress.LookAndFeel.LookAndFeelStyle.Skin;
//Here we specify the skin to use by its name
DevExpress.LookAndFeel.UserLookAndFeel.Default.SetSkinStyle("Black");
If you want to set the look and feel of your application like Office 2003, the setup is different. You just have to call the following function:
DevExpress.LookAndFeel.UserLookAndFeel.Default.SetOffice2003Style();
So, every control of devexpress will use these settings to paint themselves. It is possible to specify a custom LookAndFeel object for some controls but I never used it because I dont see the point to have a custom display for a control or a form.
Exception:
There is one exception in Devexpress framework. The NavBarControl does not use the skin technology automatically from your global LookAndFeel object, you need to specify a setting to enable that:
//To use the current skin
youNavBarControl.PaintStyleName = "SkinNavigationPane";
//To use the current look and feel without the skin
youNavBarControl.PaintStyleName = "NavigationPane";
With version 11.2 I used the information in this article:
http://www.devexpress.com/Support/Center/p/K18013.aspx
In summary :
* Inherit all your forms from XtraForm
* Leave look and feel settings default so that they use the default skin
* Modify the default skin with the following line of code:
DevExpress.LookAndFeel.UserLookAndFeel.Default.SkinName = "DevExpress Dark Style";

TYPO3: Change plugin from USER to USER_INT type

I have a working TYPO3 extension. It is attached this wiki page. How can I change the code of this extension so it is of the USER_INT type? I.e. I don't want TYPO3 to cache the output of this plugin, and want TYPO3 to invoke the extension ever time a page that uses the extension, i.e. disable the caching for this extension.
To disable caching for your extension go to your piX/class.tx_XXX_piX.php file and remove the following line (below your class declaration):
var $pi_checkCHash = true;
You also need to add the following line in the main method (below $this->pi_loadLL();):
$this->pi_USER_INT_obj=1; // Configuring so caching is not expected. This value means that no cHash params are ever set. We do this, because it's a USER_INT object!
grunwalski it's the opposite you have to change this:
t3lib_extMgm::addPItoST43($_EXTKEY,'piX/class.tx_yourextension_piX.php','_piX','list_type',1);
to this:
t3lib_extMgm::addPItoST43($_EXTKEY,'piX/class.tx_yourextension_piX.php','_piX','list_type',0);
The simpliest way to solve your problem is to go back to Extension Maganer, select your extension, choose "Edit in Kickstarter" from the dropdown menu, and then select the corresponding Frontend plugin to edit it's properties.
Check the first checkbox which means that you want your plugins to be rendered as USER_INT cObjects. After that click the View result button, uncheck all custom PHP files (your own code, like modules and plugins) on the right side and click the WRITE button. Please be careful. If you don't uncheck the checkboxes of your own files, they will be overwritten with dummy files.
The correct and comlete way to do this is a combination of the answers of #arturh and #Mehdi Guermazi:
change the last parameter in the addPItoST43() call in ext_localconf.php from 1 to 0
remove the var $pi_checkCHash = true; line from the property definitions in the head of the pi1 class.
add the $this->pi_USER_INT_obj=1; line to the start of the main() function in pi1.
These changes are identical to what you will get when you use the kickstarter method explained in the solution of #bencuss.
When you have created your extension with Kickstarter you also have to go to the file [yourextension]/ext_localconf.php and change this line
t3lib_extMgm::addPItoST43($_EXTKEY,'piX/class.tx_yourextension_piX.php','_piX','list_type',0);
to this:
t3lib_extMgm::addPItoST43($_EXTKEY,'piX/class.tx_yourextension_piX.php','_piX','list_type',1);
Edit the file setup.txt of your extension "myext". Change "USER" into "USER_INT".
plugin.tx_myext = USER_INT
plugin.tx_myxt {
This extension will never be cached.

Resources