Can anyone provide me sample code to develop a struts i18n application containing two jsp pages with two buttons (a single toggle button) to switch b/t two languages?
I am a new to struts.
You can start with this link for some introductory info into internationalized messages then basically, for Struts i18n messages, you would use the <bean:message> tag. The Action class has a method you can use to set your desired locale in session scope and the message tags will pick it up from there.
There are plenty of examples you can find on the web (even if not as specific as you demanded :D). Maybe this article can get you started.
Download sample app from Struts site These sample application are packaged as WAR files. You can import HelloWorld.war from your eclipse and run index.jsp
You don't really need Struts to accomplish internationalization. You can use the JSTL formatting tags. You can use the fmt:bundle tag in your JSP to set the resource bundle to use. Basically a resource bundle is a collection of property files, one for each language that your application supports, that have a common base name. The fmt:message tag will print a message from the resource bundle based on a key. The last thing you need to do is to use the fmt:setLocale tag to actually set the locale (in other words, which of the resource files in the bundle to use) based on what language you want to display.
A good place to start is here:
http://docs.oracle.com/javaee/1.4/tutorial/doc/JSTL6.html
Related
I know Alfresco stores messages and i18n labels for the UI in ".properties" files,
I would like to know what are the Alfresco conventions to write those files
How it is better to write those key?
It is correct to write form.form-id.title=myTitle or should I use another convention?
Do you use another prefix like the namespace (myc.form.form-id.title=myTitle)
Thanks to all
Indeed, if you want to set labels in properties files for a custom form, you have to keep Alfresco standards. See comments in tomcat/shared/classes/alfresco/web-extension/share-config-custom.xml :
If a type has been specified without a title element in the content model, or you need to support multiple languages, then an i18n file is needed on the Repo AMP/JAR extension side for the type to be visible when creating rules:
custom_customModel.type.custom_mytype.title=My SubType
Used by the "Change Type" action. For the type to have a localised label add relevant i18n string(s) in a Share AMP/JAR extension:
type.custom_mytype=My SubType
But if you define your own properties in custom Java code and spring beans, maybe could you keep choose the most comprehensive name for a user or admin sys which will have to configure your properties.
To answer to your question, I don't know any standard for these new properties.
Hope it helps
Is it possible to retrieve drl ex:https://host:port /ewebtop/drl/objectId/0900a58e80970f7b of document via .net application?.So that when users clicks on this link they can be able to edit the document and when they close the document the document should be autosaved onto documentum.
First of all: a link is a link. What you decide to do with it I u to you. Default handler in browser will just redirect you to webtop application. If you have SSO you can have the document opened for edit. There are some extra arguments that can be provided (view/edit).
The object id is the only varying part of the URL, so you can easily construct this in code.
Secondly: what is your goal? There is no way to make the document upload itself into Documentum repo. You can write a plugin for every application to handle that, but it seems like a big task - especially dealing with security.
The problem is that upon check-in, user must provide some information - at least about the new version number...
If you're building a thick client in .net I would go with DFS - that's the only real option here.
I'm looking to create a central repository for all of our published API documentation using DocFx. I have documentation auto-generated via my build (using TFS) and published through my release (using Octopus) just fine for multiple individual sites. However, I'm wanting to pull it altogether in one location. The thinking is that through a parent site you could filter content in any of the individual sites without having to drill down into them. Do you have a recommendation on how to do this?
Also, within this same documentation repository I want to provide the capability to search by all of the meta data (project-level documentation) across the hundreds of projects in our portfolio. This will give our BA, DEV and QA teams easier access to what all our systems do. I like the "filtering" capability built into DocFx, but I'm wanting full-text search across all of the meta data. Do you have a recommendation for this functionality as well?
To change the location of the docfx output, edit the docfx.json file and specify the dest value. By default it is "dest": "_site". For more formatting guidance, reference: https://dotnet.github.io/docfx/tutorial/docfx.exe_user_manual.html.
Regarding full-text search, that is possible by simply ensuring the ExtractSearchIndex post-processor is invoked (in order to generate an index.json file of keywords) and that the global _enableSearch value is set to true in the docfx.json file. A snippet from that file would look like:
"postProcessors": [ "ExtractSearchIndex" ],
"globalMetadata": {
"_enableSearch": "true"
}
For your first question:
I think what you expect is like the .NET API Browser. The source code behind this page is not open to public, so you need create this page by yourself, through collecting xrefmap.yml from multiple sites, and extract the needed data into this page.
For your second question:
DocFX uses Luna to scan all the output files and generate an index file called index.json for later search use. In your case, you should want to limit the search scope only in the metadata you defined. This is also not supported by DocFX by default. You can also use Luna in your central place to search these meta. You can create your specific index.json for each project first, and the cental place to collect them for the search page.
I'm investigating the use of Eclipse as a platform and I am trying to figure out how a plugin provides configuration. For example, say I have a plugin to display a user defined message. Further, I want that user defined message to be configured by the user. What is the standard way for the user to edit this message in the platform? Is there any documentation for this?
As you mentions in the comments, the article Preferences in the Eclipse Workbench UI described the way developers define preference pages for their plug-ins.
By use of the preference store in conjunction with the preferences dialog and provided field editors a plug-in developer can quickly put together a user interface for managing preferences.
The color preference page is an example of a simple page that uses a single JFace field editor to manage its values
That way, you can define several type of custom values configured by the user:
text field
set of predefined values (dropdown list)
array of values
Example:
Found it: http://www.eclipse.org/articles/Article-Preferences/preferences.htm Wow, Stackoverflow helps a lot! You only need to post and it magically comes up in Google
Sorry to VonC but I had already found it before he posted the answer :-/
I am working on a website in dnn. I want to change the language of website or particular page. So I download the language package for spanish(es-es),chinese(zh-cn) and install them from host. Next when I changed the language of browser then the website language didn't change. Working on dnn 5.0.
Please let me know how I can use language packages in dnn website.
For initial translations and maintenance of DotNetNuke translations, I recommend the use of OmegaT. It handles resx files directly. And content (such as HTML or Blogs) can be downloaded, translated and then uploaded thanks to the APIs of DNN (drop me a note if you need the scripts).
OmegaT stores the translations in it's memory (a TMX file, which is actually some kind of XML). It also uses Google Translate and similars, and has a fast user interface which increases translation speed a lot when compared against continously waiting for DotNetNuke to handle your updated resources.
More info on OmegaT. An example of a translated site and modules: site translated from Dutch into English
You should probably ask this in the DotNetNuke forums: http://www.dotnetnuke.com/tabid/795/default.aspx.
There's one dedicated forum for questions about language packs and localization. You will probably find your answer there: http://www.dotnetnuke.com/Community/Forums/tabid/795/forumid/77/scope/threads/Default.aspx
The language packs don't always have translations for everything on the site, especially content that you added yourself. You'll need to do two things to get them working properly:
Go to Admin > Languages, and enable the languages you want to use.
Open the Language Editor and start translating. Under each resource name, you will see an edit text box for the localized value, and a read-only text box for the default value. In most cases, you'll need to translate verbatim what you see under "default value".
We had to write our own menu provider to get the menu to do this - instead of going for the resource files we went for a database solution - other reasons applied to this as well - we also built an interface for doing this - as for things like the text/html module there are some third party builds that allow you to nationalize content. Apollo comes to mind Apollo Software they have some multilanguage modules
The language packs will typically only localize text used by the core such as "Login" and "Settings". It is designed so that you can have a site in a language other than English, not so you can have multiple languages on one site. You can easily have multiple portals, each with a different language.
In order to have multiple locales on one portal you will need to use a third party module or develop your own.