There are a lot of places in liferay portal where translation to my language (sk_SK) is wrong. Is it possible to rewrite those bad translations with hook? (Any other idea is welcomed...)
Thanks a lot.
yes you can do it.
in your liferay-hook.xml file add entry for language file which you want to override,
like in your case Language_sk.properties
<hook>
<language-properties>content/Language_sk.properties</language-properties>
</hook>
you can check this file in Liferay source code from below location
LiferaySrcFolder\portal-impl\src\content\Language_sk.properties
Related
I am trying to limit the languages to only English. We have not yet translated any of our content, so having Liferay able to change it's language isn't helpful, and has caused some issues when user's accidentally stumble across URLs that have an alternate language in them.
So we want to limit the language to only English. I have set the following in portal-ext.properties:
locales.enabled=en_US
However, if I then access with a different language in the url ('iw' for example), the page is still translated.
So, am I not understanding what this setting does? Does it only limit the languages available in the language picker or something? I would appreciate any suggestions as this has become a frequent occurrence for our users as Google has also indexed some of our pages in different languages.
We are using Liferay 7 GA 7.
Thanks!
I have tested this on my liferay-ce-portal-tomcat-7.3.5-ga6-20200930172312275 server:
I used these properties in my portal-ext.properties file:
locales=en_US
locales.enabled=en_US
locale.prepend.friendly.url.style=0
When the portal started up, I visited these sites and indeed the pages were not translated as you requested:
http://localhost:8080/iw
http://localhost:8080/de
Please let me know if you had another use case in mind
Some useful resources:
https://issues.liferay.com/browse/LPS-65042
https://docs.liferay.com/portal/7.3-latest/propertiesdoc/portal.properties.html
for me helped adding
locales=en_US
locales.enabled=en_US
to this path bundles/portal-setup-wizard.properties, bundles/portal-ext.properties
When I type file://someDir/image.png in Visual Studio source code comment (2012, c#, for that matter), I guess it's a relative path. So what is the base address? is there a way to set, for instance, current project as the base address (or even use some kind of placeholder like %PROJECT% or something similar) ?
I want to use image to explain complicated idea, like:
// take a look at:file://ThisExplainsItBetter.png
ImageComments extension for Visual Studio can display images and use relative paths.
What you're asking for is not really possible, as there is no comment pre-processor for C#, or any other language that I can think of. The source code is turned into the executable, but the comments are ignored.
In addition, such a pre-processor would inadvertently edit your code before compilation, or do some other spooky stuff, which may change your executable's logic.
You can go with may be it will help you
string startupPath = System.IO.Directory.GetCurrentDirectory();
string startupPath = Environment.CurrentDirectory;
Or if you have Image folder inside your repository you can use "../../" or "~/"
It will get file from your project root.
I have a project with a sourcecontrol block which has a trunk url value.
I also use intervalTrigger with modification exists property.
I'd like to only build if there are modifications in a sub path of the trunk url, anyone know how I might do that?
Please check the following post, I think it's related:
how to customize buildCondition="IfModificationExists" on CruiseControlNet build?
and there's the filtered source control block which should do what you need:
http://cruisecontrolnet.org/projects/ccnet/wiki/Filtered
Two questions, hopefully with similar answers.
I'll be releasing a JavaScript package in my solution where the error messages are to be displayed. The problems is that I'll be targeting German, English and French. Possibly, also a fourth language TBD. What would be the nicest way to resolve this?
The label names should definitely be localized. Is there a built-in approach to that in CRM 2011? Like a resource table or something like that?
My current solution for (1) is to keep an extra web resource with the strings and distributing a different file for each language. I may rebuild it and distribute all the languages at once and only use a parameter, possibly settable from the GUI if I create a settings-entity. A bit cumbersome.
My current solution for (2) involves a lot of praying and a divine act of some sort. :)
To determine current CRM user language dynamically from Javascript you can use window.USER_LANGUAGE_CODE (this variable exists on all CRM pages) - for example it will be equal 1033 for English. Than based on that info, you can pick needed string resources from your file.
Also in forms context there are two predefined functions, which return current Organization language code and current User language code: Xrm.Page.context.getOrgLcid() and
Xrm.Page.context.getUserLcid() .
If you are talking about custom entities and fields, you can easily add localized display names for them via your solution. You need to edit customizations.xml file from your unzipped solution. For each attribute there you will find such XML containing display names:
<displaynames>
<displayname description="Created By" languagecode="1033" />
</displaynames>
You can just add new display names for each language you need there.
P.S. If someone interested in different aspects of multilangual support for Dynamics CRM 2011 solutions, I strongly recommend to review this page, also here and here is a very helpful reading.
I need to change the language of whole project. I am using jsf. In default I used English. Now i need to convert it in Italian and Spanish.
I did it by manually writing in the property class. Just like:
and in xhtml I need to to put the property by manually.
My question is that, is there any way to convert it automatically?? I mean I just click on Italian, and it will display in italian language.
You need to create one file by language (with the correct name)
And fill every - key manually ...
Netbeans help you to display all languages in the same table.
The automaticaly option is Google trad.. it's not good solution.