I ran into a typical scenario where it required to change product name as supplied from command line parameters as below
MSBuild.exe ApplicationSetup.wixproj /p:AssemblyTitle=%USER_SPECIFIED_NAME% /p:ProductVersion=%VERSION% /p:ProductCode=%PRODUCT_CODE% /p:UpgradeCode=%UPGRADE_CODE% /t:Clean;Rebuild"
I am using those supplied parameters in .wxi file. as below :
<Product Id="$(var.ProductCode)" Name="$(var.AssemblyTitle)" Language="4"
Version="$(var.BuildVersion)"
Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
This code compiles successfully. But the name of product in add/remove program is not reflecting correctly. I read that Product name cannot be supplied directly, it should be hard coded.Please advise on this.
Another typical requirement is to have multiple version installed of same product on a machine. I somewhat achieved this by doing following change in Product tag in .wxi file
<Product Id="*" Name="$(var.AssemblyTitle)" Language="4"
Version="$(var.BuildVersion)"
Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
Now here come the issue that second installation will overwrite the file generated during first installation. So it is required to change install directory dynamically.
I have posted this after struggling for couple of days and tried many solution, but all in vain. Any help will be highly appreciated.
I'm trying to use i18n functionality in templates in Silverstripe.
In a template ss file, I have the following:
<h4 class="red-underline"><%t Namespace1.Replace "ToBeReplaced" %></h4>
And I have the following in /lang/en_US.yml:
en:
Namespace1:
Replace: 'ReplacedString'
I have also added this to my _config.php:
use SilverStripe\i18n\i18n;
i18n::set_locale('en_US');
And this in my config.yml:
SilverStripe\i18n\i18n:
common_locales:
en_US:
name: English (USA)
native: English
But the string "ToBeReplaced" is not replaced.
The documentation I can find about this, is:
https://docs.silverstripe.org/en/4/developer_guides/i18n/
Am I missing something?
The problem was that the lang folder was added to the wrong location.
It should be located in /mysite/lang/
I checked out the question here: Joomla! 2.5 language file - translate description
It is exact the problem I have but unfourtunately I cannot answer the commen from Valentin. So here is my Problem again:
In my xml-File I have this line:
<description>COM_MYCOMPONENT_DESCRIPTION</description>
And in the file en-GB.com_mycomponent.sys.ini I have this:
COM_MYCOMPONENT="MyComponent"
COM_MYCOMPONENT_DESCRIPTION="This is the myComponent description"
COM_MYCOMPONENT_SUMMARY="Summary"
But in Debug-Mode for Languages I have every time this result:
??COM_MYCOMPONENT_DESCRIPTION??
Any Ideas?
Björn
You are using the language file correctly, therefore I am under the impression that it's due to the location of the file. Make sure you have the following in your XML file:
<languages folder="language">
<language tag="en-GB">en-GB/en-GB.com_mycomponent.ini</language>
<language tag="en-GB">en-GB/en-GB.com_mycomponent.sys.ini</language>
</languages>
Also take note of the location:
I have used folder="language" then used en-GB before the file name so the folder structure will be like so:
root(where the XML is)/language/en-GB/en-GB.com_mycomponent.sys.ini
You don't have to put your language files in both places.
Your first configuration is actually correct and is working on Joomla 3.3 for sure.
In your manifest file you should have the language files declares as
<administration>
....
<folder>language</folder>
.....
</administration>
and dont make use of
<languages>....</languages>
Also on your package the folder structure should be
admin/language/en-GB/en-GB.yourcomponent.sys.ini.
If you have this configuration already, you are correct.
In that case from the message of the language debug mode, I assume that you either have mispeled something or there is an error inside your language file.
The latter is what usually happens with me. For example many times I have this error:
COM_MYCOMPONENT_TRA="A translation string"
COM_MYCOMPONENT_ANOTHER_ONE="Another one"
COM_MYCOMPONENT_SOMEOTHER=Some othen translation string"
COM_MYCOMPONENT_MORE="One more "
COM_MYCOMPONENT_LAST_ONE="E translation string"
(Missing the first double quote on the third line).
I'm trying to add the syntax plugin for the Go programming language in Notepad++.
There is a repository for such user-defined languages. I downloaded and unzipped the Go files, which contained a README, a userDefinedLang_Go.xml, and go.xml.
I attempted to follow the instructions at the bottom of the page as follows. Since I am using Windows 7 (x64), my Notepad++ directory is "C:\Program Files (x86)\Notepad++".
Having not installed a user defined language before, I didn't have a userDefinedLang.xml file already, so I copied userDefinedLang_Go.xml into the root directory, and renamed it to remove the "_Go", making it userDefinedLang.xml.
I then copied go.xml into C:\Program Files (x86)\Notepad++\plugins\APIs\
This seems to be all of the steps necessary. However, when I open Notepad++, there is no "Go" near "Lang => User Defined", and there is no syntactic coloring on a .go file. Attempting to import via "View => User-Defined Dialogue => import" gives a "fail to import" error.
What am I doing wrong? I'm using a clean installation of Notepad++, which is version 6.1.8.
I had to put my userDefineLang.xml file in my AppData\Roaming folder:
C:\Users\[user]\AppData\Roaming\Notepad++
New install of Notepad++ 6.4.5 on Windows 7 64 bit
Download from Notepad++ site:
http://docs.notepad-plus-plus.org/index.php?title=User_Defined_Language_Files#G
Copy "go.xml" to C:\Program Files (x86)\Notepad++\plugins\APIs.
The default install doesn't have any user-defined languages, so you can do this:
Copy "userDefineLang_Go.xml" to C:\Users\\AppData\Roaming\Notepad++
Remove the "_Go" from the file name, so it's "userDefineLang.xml"
Uncomment the opening and closing "NotepadPlus" tags.
(If you already have a userDefineLang.xml then add the content from the _Go file.)
Restart Notepad++.
I just got it working on my system after some tinkering. Put this at the top of the userDefinedLang.xml file and the go.xml file:
<?xml version="1.0" encoding="Windows-1252" ?>
That should do the trick (after reopening Notepad++).
go.xml should be in the plugins/APIs folder, and userDefinedLang.xml goes in the root of Notepad++ as you said.
Something other answers do not discuss: Some older versions of Notepad++ do not appear to work with any of these answers.
I tried pretty much all the solutions before upgrading Notepad++ to version 6.4.2.
xkcd 979
Tested Notepad++ versions:
5.9 - not working - tested by namey
6.4.2 - working - tested by Elysian Fields
6.6.9 - working - tested by namey
For other versions your mileage may vary.
I share the solution I found for Notepad++ 6.5, because I had the same issue than the previous messages.
If not done, do the install steps explained in go\misc\notepadplus\README (userDefineLang.xml,functionList.xml,APIs).
When you don 't have useDefineLang.xml in Notepad++, create one using the file from go\misc\notepadplus\useDefineLang.xml, but don't forget to add the first line <?xml version="1.0" encoding="Windows-1252" ?>
and uncomment NotepadPlus part to have <NotepadPlus> at the beginning and </NotepadPlus> at the end.
Change in functionList.xml: <association ext=".go" id="go"/> BY <association userDefinedLangName="go" id="go"/>
As I didn't have any userDefineLang.xml file by default in Notepad++, I imported this file using the menu Language → Define your language → *Import.
Then stop/start Notepad++.
Check that Go is in the Language menu at the end of the list.
Open a .go file. If the color doesn't change automatically click on go in /Language menu
All were OK after that for me (indentation, color, autocompletion, etc.).
I added pl/sql language syntax to Notepad++. The syntax /language was on the web. Here's how I got it to work ...
Open the XML file using Notepad and added <?xml version="1.0" encoding="Windows-1252" ?> to the very beginning, as David had suggested. Then save it to userDefinedLang_plsql.xml
Paste the file in the Notepad++ root directory.
I also copied it into C:\Program Files (x86)\Notepad++\plugins\APIs\, and navigated to menu Languages → Userdefined, but it did nothing.
So, I then went to menu Languages → Define your language and selected pl/sql from the drop down, renamed it, and saved it in that dialog window.
The new language then it appeared in the language dialog at the end.
userDefineLang resides in C:\Users\username\AppData\Roaming\Notepad++\userDefineLang.xml.
Make sure your Notepad++ is installed under "C:\Program Files(86)", and not under "C:\npp.#.#.#.bin" folder.
And download from https://notepad-plus-plus.org/download. Or simply google "Download Notepad++".
Check out a sample Scala language userDefineLang.xml file here: https://github.com/nfang/scala-syntax-highlighter
If you don't have any user languages defined before, then after renaming userDefinedLang_Go.xml to userDefinedLang.xml, also edit the text of file by adding the tags <NotepadPlus></NotepadPlus> around the original content.
I'm getting this message at the frontend and the backend: There has been an error processing your request.
When I delete the cache folders (var/cache, /tmp & /session) I get the frontend working again until I visit any page in the store with a price in it. The backend is harder to get working again (it isn't right now).
Checking the error logs I get a whole bunch of them starting with "Currency 'USD' not found". This all started happening after a few minor changes including changing the order of the currency code from "$ 100.00" to "100,00 €" which I did by editing /lib/Zend/Locale/Data/es.xml (the spanish language specification) here:
<currencyFormats>
<currencyFormatLength>
<currencyFormat>
<pattern>¤ #,##0.00</pattern>
</currencyFormat>
</currencyFormatLength>
<unitPattern count="other">{0} {1}</unitPattern>
</currencyFormats>
I tried returning to the previous format and then copying the original file back. Something else must have broken somewhere and I can't find it.
Here is a summary of the last steps in the Error logs (do you need them all?)
a:5:{i:0;s:24:"Currency 'USD' not found";i:1;s:3740:"#0 /home/content/32/9343032/html/app/code/core/Mage/Core/Model/Locale.php(575): Zend_Currency->__construct('USD', Object (Zend_Locale))
#1 /home/content/32/9343032/html/app/code/core/Mage/Directory/Model/Currency.php(233): Mage_Core_Model_Locale->currency ('EUR')
#2 /home/content/32/9343032/html/app/code/core/Mage/Directory/Model/Currency.php(216): Mage_Directory_Model_Currency->formatTxt(NULL, Array)
#3 /home/content/32/9343032/html/app/code/core/Mage/Directory/Model/Currency.php(197): Mage_Directory_Model_Currency->formatPrecision(NULL, 2, Array, true, false)
#4 /home/content/32/9343032/html/app/code/core/Mage/Adminhtml/Block/Dashboard/Bar.php(82): Mage_Directory_Model_Currency->format(NULL)
Please help me out here...
Thanks
Miguel
Clear cache, remove all session file from var/session and refresh.
First check your Magento Locale setting from admin panel
system->configuration->
General->General->Locale Option
Locale // check what option is selected.
if option is english(United Kingdon)
Please update the locale file..or check if there are currency setting is available.
Go to cpanel and open magento file :
lib/Zend/Locale/Data/en.xml
<currency type="USD">
<displayName>US Dollar</displayName>
<displayName count="one">US dollar</displayName>
<displayName count="other">US dollars</displayName>
<symbol>$</symbol>
</currency>
OR YOU CAN ADD the option below
<numbers>
<currencyFormats>
<currencyFormatLength>
<currencyFormat>
<pattern>¤#,##0.00;(¤#,##0.00)</pattern>
</currencyFormat>
</currencyFormatLength>
<unitPattern count="one">{0} {1}</unitPattern>
<unitPattern count="other">{0} {1}</unitPattern>
</currencyFormats>
add the below lines
<currencies>
<currency type="USD">
<displayName>US Dollar</displayName>
<displayName count="one">US dollar</displayName>
<displayName count="other">US dollars</displayName>
<symbol>$</symbol>
</currency>
<currency type="USN">
<displayName>US Dollar (Next day)</displayName>
<displayName count="one">US dollar (next day)</displayName>
<displayName count="other">US dollars (next day)</displayName>
</currency>
</currencies>
</numbers>
after all the changes.. please clear the magento cache..to work all changes properly