XCode: Additional localization of only one button - xcode

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.

Related

how to call SetExtendedUI on CMFCToolBarFontComboBox

I am creating a MFC application based on example: https://github.com/microsoft/VCSamples/tree/master/VC2010Samples/MFC/Visual%20C%2B%2B%202008%20Feature%20Pack/WordPad
now i want to change the way to expand font name drop list in toolbar from DOWN key to F4. It seems i need to get the combobox and call SetExtenedUI(FALSE) on it, but i dont know where to do it.
To change the extended UI flag on a CComboBox, you call its CComboBox::SetExtendedUI member. When you have a CMFCToolBarFontComboBox you need to get to its combo box first. Since it inherits from CMFCToolBarComboBoxButton you can use its CMFCToolBarComboBoxButton::GetComboBox member to get a CComboBox*.
CMFCToolBarFontComboBox* pFontButton = ...;
CComboBox* pComboBox = pFontButton->GetComboBox();
pComboBox->SetExtendedUI(FALSE);
finally i switched to CComboBoxEx which works fine

How to get content from field

I'm totally new to Base. I have different forms but in one named F_STRUCT of them I'm trying to make a macro which will allow the user to autofill another field when he select a zipcode.
so the database looks like this.
ID_ZIP ZIP CITY
1 97425 Les Avirons
2 82289 Toto
In my forms, I have a select which allows to select the ZIP code. It's label and name is ZipCode.
So I don't really know where to find the API reference for all the methods and chill methods, I followed examples from internet.
I tried this
Sub getZip
Dim Doc As Object
Dim DrawPage As Object
Dim Form As Object
Doc = StarDesktop.CurrentComponent
DrawPage = Doc.DrawPage
Form = DrawPage.Forms.GetByIndex(0)
Toto = Form.GetByName("ZipCode")
Print "hey"
End Sub
But it returns an error on the Toto = Form.GetByName("ZipCode") line.
The code works, so the problem must be how you created the form or control. Follow these instructions to set up a correct example:
Create Form in Design View
Use the List Box tool (is that what you mean by "select"?) and create a control.
Cancel out of the wizard if it pops up.
Right-click on the control and select Control Properties (not Name, which would modify the shape name instead of the control's name).
Set the Name to "ZipCode" (without quotes).
Save and close the form.
Open the form. In the window of that form (the CurrentComponent) go to Tools -> Macros -> Run Macro.
A list of documentation links for Base is at https://ask.libreoffice.org/en/question/80972/to-learn-libreoffice-base-are-there-introductions-or-tutorials/?answer=80973#post-id-80973.

Custom Control with Localization Support in WP7

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.

Change/remove '--Please Select--' message from Custom Option dropdown on Magento Product page

I want to change the dropdown message or remove it all together. I've searched for instances of --Please Select-- but I cannot find the one that controls the Custom Option dropdowns.
Searched high and low but I cannot find where this code lives in Magento, any help will be greatly appreciated!
The easiest way to change the text would be through translation. Open app/locale/en_US/Mage_Adminhtml.csv (or whichever language you have installed) and you'll see a row for "-- Please Select --" already there, change the text in the second column and clear the translation cache. This affects all instances of "-- Please Select --" throughout the admin.
To be more specific copy the file app/code/core/Mage/Adminhtml/Model/System/Config/Source/Product/Options/Type.php to an equivalently named folder in app/core/local/ and either change or delete the line that looks like this:
array('value' => '', 'label' => Mage::helper('adminhtml')->__('-- Please select --'))
I had a similar issue myself and, after searching high and low, decided to take what I knew about Magento and tackle it alone.
And here's your answer:
Open: \app\code\core\Mage\Catalog\Block\Product\View\Options\Type\Select.php
Alter the following lines:
if ($_option->getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_DROP_DOWN) {
$select->setName('options['.$_option->getid().']')
->addOption('', $this->__('-- Please Select --'));
}
To:
if ($_option->getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_DROP_DOWN) {
$select->setName('options['.$_option->getid().']');
// ->addOption('', $this->__('-- Please Select --'))
}
Summary of changes: I commented out the ->addOption line with two forward slashes AND - and this is important - I moved the semi-colon from the end of that line to the end of the previous line. Reversing this change allows you to undo the changes you made.
When you plug that pup in, you'll see on the frontend your first custom option displaying as the default text.
Here's an example from my website, a product page for my Rugged Notebooks distribution company.

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