Opencart 2.2.0.0 Translation Issue - opencart2.x

I am trying to translate opencart version 2.2.0.0
I have translated the file and put them in following 2 directory
catalog/language/bangla
admin/language/bangla
it is working for category, product description etc from admin backend but not working for any of the parameters given in .php file like '
$_['text_checkout'] $_['text_wishlist'] etc. etc
I am testing it in localhost. Am I doing anything wrong?
thanks

To install a language package, you have to transfer all your files on your server (keeping the same structure) on the roots of a previously installed OpenCart.
After that, open your OpenCart backend and follow these steps:
Navigate to System -> Localisation -> Languages
Click the Add New button
Fill in the following values :
Language Name : name of the language, for example French
Code : code of your language, for example fr
Locale : localization of your language, for example fr,fr-FR,fr_FR.UTF-8,french
Image : flag image for the language, for example fr.png
Directory : directory of your language pack, for example fr-FR
Status : Enabled
Sort Order: 1
Save these changes
Navigate to System -> Settings
Click on the tab Local and define your standard languages for frontend and backend (backend language will not change before this step)
Save these changes
Installation is complete

Related

How to rename an existing Hybris extension

I am working on Hybris and I generated a new extension using hybris command (ant extgen) with default settings. During extension generation, I did not change default values like I let the project name to be "training". I started developing some code just for the sake of trying it but now I wrote quite a lot of code and instead of generating a new extension, I am trying to rename "training" to a new name which is more suitable for my project.
My question is - Is there any shortcut to rename "training" to a new name. By rename I don't mean standard intellij or eclipse module rename but also updating all extension specific properties which are referring to extension name "training". Is there any hybris ant command for it?
Here is the way I can think of.
You can declare your extension as a template for extgen and then generate a new extension based on it with a new name and structure.
Let me take training as your current extension which you want to convert to some other name. Below are the steps you need to perform.
Make sure your extension (training) is there in the localextensions.xml
Update extensioninfo.xml to mark the extension as a template by adding below meta tag
<meta key="extgen-template-extension" value="true"/>
Look like
<coremodule generated="true" manager="org.training.jalo.TrainingManager" packageroot="org.training"/>
<meta key="extgen-template-extension" value="true"/>
<webmodule jspcompile="false" webroot="/training"/>
Create an extgen.properties inside training extension/folder with below properties
Please note, If your current extension is with a different name then training in that case you need to change below values accordingly.
extgen.properties:
YEXTNAME_TOKEN=training
YMODULE_TOKEN=training
YMODULE_PACKAGE_ROOT=training
YMODULE_CLASS_PREFIX=training
YPACKAGE_TOKEN=org.training
YMANAGER_TOKEN=TrainingManager
YCLASSPREFIX_TOKEN=Training
YGENERATED_TOKEN=Generated
Run ant extgen and select your extension (training) from the given selection option and give the name and package the way you want when it prompt for it.
Now replace training extension with the newly created extension inside localextensions.xml
Test and patch wherever needed! :-)
I don't think so. It might also be easier just to create a new one and move the code into the new extension.
No it is not possible. The generated extension itself was created from a template where the word "training" is inserted into many places (class names, package names, configurations...) .
The other approach would be to look into the ext-template folder (6.7). There are all templates. Search for any token in the templates and make appropriate change in your generated extensions.
Depending on the amount of your extensions, it will also take some time... and you need to understand how extgen works, first.

How do I localize VersionInfo of an Inno Setup installation file?

I am creating an application that has a different name depending on the user language. So for example the software is called "Device Emulator" in English and "Geräteemulation" in German.
I want to reflect the different names in the Version Info of the setup file (right click -> Properties -> "Details" tab).
So far I have found no way in Inno Setup to specify a localized "VersionInfo", neither in the online help nor on the net.
Originally I tried to use custom messages in the setup sections of which I learned I am not allowed to. See code below.
[Setup]
AppName={cm:ApplicationName}
AppVerName={cm:ApplicationName} V{#MYVERSION}
AppCopyright=© 2018 {#MYCOMPANY}
AppPublisher={#MYCOMPANY}
AppVersion={#MYVERSION}
AppId={cm:ApplicationName}{#MYVERSION}
VersionInfoVersion={#MYVERSION}
VersionInfoCompany={#MYCOMPANY}
VersionInfoCopyRight=(C) {#MYCOMPANY}
VersionInfoDescription={cm:ApplicationName}
VersionInfoProductName={cm:ApplicationName}
VersionInfoProductVersion={#MYVERSION}
I expected this to show me a property window with localized application name and version information but unfortunately it just displays {cm:ApplicationName} for AppName, VersionInfoProductName and VersionInfoDescription.
So, does any of you know how to localize this in Inno Setup?
All Inno Setup constants are evaluated on run/install-time. While version info is a compile-time thing (it's built into a header of the installer .exe file). So you cannot use constants in any of the VersionInfo* directives.
While technically, Windows .exe can include separate version info structures for different locales (languages), this is not supported by Inno Setup.
Inno Setup has only a single placeholder for the version info.

JHipster new module : cannot add translation

I have added a new module with several components inside JHipster. I would like so add the translation in the html part with the JHipsterTraslationService and tried to do it but I do not know. I think I have to suscribe to the new service but I don't know how.
Jhipster use jhiTranslate in the html, for example: <label class="form-control-label" jhiTranslate="myApp.myComponent.myWelcome">My default welcome text</label>,
this refers to the value of the field in your translation .json file, it will look for it in that file and replace it with the value it has. Otherwise, it will show the value, "My default welcome text".
When you create a component with jhipster using angular cli, the translation files are created in each language folder of your application.(example: myApplicationName\src\main\webapp\i18n\en)
This is the example they put in their documentation (Generating Components, Directives, Pipes and Services) for create components:
ng generate component my-new-component
ng g component my-new-component # using the alias
# Components support relative path generation
# Go to src/app/feature/ and run
ng g component new-cmp
# your component will be generated in src/app/feature/new-cmp
# but if you were to run
ng g component ../newer-cmp
# your component will be generated in src/app/newer-cmp
I believe that it is easy and better to use this method of creation, because it will create all the necessary files, be it a component, service, directive, route, etc.
Additionally, if you have already created the components, you will have to manually create each .json file in its corresponding folder according to the languages of your application. You can also add another language to your application (How to add languages after project generation?).
Other way.... U can try add other language, with the generator. And check that files was added and what change, with this u can know what files or subscriptions can change.
I hope this helps. ;)

Liferay login portlet display text change

Change display name in login portlet from “Screen Name” to “Username”. As per discussion in liferay forums I am assuming that it can be done by using creating hook. Is there any easy way to change the display text.
As reported by discussion forum the best way to do it it's a hook. Your choice if you prefer change login jsp or change the "screen-name" resource bundle properties files. Be aware that changing screen-name label affect whole portal and wherever screen-name label was used (not only login portlet).
If you don't want write a hook, you can try to add to Liferay web application a file named Language-ext.properties within the WEB-INF\classes\content (if content dir doesn't exist create it). Edit Language-ext.properties and add a line with screen-name=Username. Restart Liferay. It should works.
Be aware that language specific version of Language properites files takes precedence over "-ext" version and location specific version takes precedence over language version. If your portal-impl contains language/location specific version you have to ovverride it with relative language specific ext file (e.g. Language-ext_en.properties)

How can I download source code from Linux Cross Reference library (generated by LXR engine)?

I wanted to download Linux kernel module source code from http://lxr.free-electrons.com/source/net/bluetooth/. Is there any tool like SVN to download the source code generated by LXR engine?
Thanks in advance!
If you're still looking for an answer, here is a procedure based on a low documented feature of LXR.
Display the file you are interested in
Modify the URL in the browser address bar, adding at the end ?_raw=1 and go there (i.e. press return key)
The file is then displayed "as is", without any decoration (it is sent as text/plain)
You can now save the file from browser menu command File->Save as
NOTES:
The ?_raw=1 argument can be used to have HTML files interpreted by your browser, i.e. displayed as HTML because they will be sent as text/html.
The feature has been present in LXR for ages, though in versions older than 0.10 the argument is spelled ?raw=1 (without underscore).
I checked that ?raw=1 works with free-electrons though they use 0.3.1 which was released in 2003!
The documentation on lxr states that there is a git repo.
http://lxr.linux.no/
I have never tried it, but it may be what you are looking for
Not exactly an answer, but I was looking for a related thing - the possibility to download individual C files from LXR as plain text. If it was possible to download files as text, in principle you could write some sort of a parser/automatic downloader for a whole directory.
The documentation for the LXR engine seems to be here:
LXR Cross Referencer - Browse /doc at SourceForge.net
... and as far as I could see from the 1.0 PDF manual (note that lxr.free-electrons.com seems to run on version 0.3.1, though), there is no mention of plain-text source files being exported (in addition) to the HTML.
So, very likely, as the plain-text source files seem not to be available in an LXR export, there will be no tool that will be able to download. (Btw, I too wish there was a tool like this, otherwise the only option is to clone the entire Linux source tree via git).
Note, however, that there is also an experimental version of LXR from lxr.linux.no ; that one generates HTML that requires JavaScript, and it will show a "download" button in its interface; then one can download the plain-text source file. As lxr.linux.no is down for me for the moment, here's a link to an annotated HTML page to another site, that seems to use the same engine (there is no note ATM for the LXR engine numeric version):
http://lxr.missinglinkelectronics.com/#linux+v2.6.38/sound/drivers/dummy.c
... and this is how the link looks like to obtain plain-text version:
http://lxr.missinglinkelectronics.com/linux+v2.6.38/+save=sound/drivers/dummy.c
Note that this is a different URL format than what lxr.free-electrons.com would use:
http://lxr.free-electrons.com/source/sound/drivers/dummy.c?v=2.6.38
... and there is a note on the start page ( http://lxr.missinglinkelectronics.com/ )
once you enable JavaScript, which states that:
lxr.missinglinkelectronics.com is currently running an experimental fork of the LXR software provided by lxr.linux.no.
... or, in other words: the link format for downloading plain-text source files from lxr.linux.no, will not work for the (current) lxr.free-electrons.com installation.
Here you can browse the references and also can download the source file
https://code-grep.com/view/project/54b083273b2082684a000008/linux-3.19-rc2
On free-electrons.com, it works by adding the argument "raw=1" in the URL. For example, this URL...
http://lxr.free-electrons.com/source/drivers/misc/lis3lv02d/lis3lv02d.c?v=3.8
... will become this :
http://lxr.free-electrons.com/source/drivers/misc/lis3lv02d/lis3lv02d.c?v=3.8&raw=1
The resulting page can then be saved using the "file saving" feature of your browser. On Linux and Windows, this is usually mapped to the ctrl+s keyboard shortcut.

Resources