I am using Rails 3.2 with I18n for my translations. I offer my clients a search functionality, but in some cases what they want to search is in my translation file and not in the database.
A good example of this is Countries, where I want users to view the country names in their own language. I have an en.yml, fr.yml, gr.yml, ect, file containing all the countries available to the users and they need to be able to search it (in their current language)
Is there an easy way to do this? (The alternative is to put the countries in a table, which I'd like to avoid unless I have no other choice)
Related
I´d like to implement something like a store finder by ZIP-code in my TYPO3 website. I know there are Extensions that let users enter a ZIP-code/adress and find the nearest location but that's not what I´m after.
We deliver to our customers and follow fixed delivery plans. I want a user to enter his ZIP-code and the website should answer with one (or more) snippets with the delivery tables for the matching driver (or drivers).
TD;DR How do I search a multitude of content elements in TYPO3 and display only those with matching substrings?
Maybee just use Content Object "CONTENT" and use "select" in Typoscript:
https://docs.typo3.org/typo3cms/TyposcriptReference/ContentObjects/Content/Index.html
And write your own select statement like:
"where = (title LIKE '%ZIP%')"
https://docs.typo3.org/typo3cms/TyposcriptReference/Functions/Select/Index.html
An example, in german, but you will understand the typoscript part:
http://www.typo3wizard.com/de/artikel/das-content-objekt.html
For an academic plone site I am creating, it is desirable to support document tags (see below).
There are multiple users for this site, and each user has a (long) list of publications that they alone can add / edit.
In its simplest form, a publication entry consists of a hyperlink or even just plain text. For instance:
A. Baynes, J. Watson and S. Holmes, "The role of observation and deduction in forensics", Applied Crime Solving, 221, 210-243 (1901). doi: 10.1032/acsolv2714
(The above is a fictitious article, but it has all the elements one expects in most citations.)
For those unfamiliar with DOI links, these are fixed text strings that can be resolved to the page for the article in question using dx.doi.org. Further, copyright / license terms often prohibit the authors from providing a full PDF / HTML for their articles on their websites. The articles often lie behind a paywall (usually accessible from most Universities / major research labs). So, running full text searches on the article itself is NOT an option.
Returning to the problem definition, I am assuming that the users will add their publications as links, but I want to give them the ability to specify a comma separated list of words / phrases (or tags) that more closely identify what the article is about.
For the above article, an appropriate list of tags would be:
forensics, haemoglobin, degradation of evidence
After each user appends such tags to the article, I want to create a backend that will allow visitors to the site to simply be able to enter these tags in a search field and find all publications that pertain to, say, haemoglobin.
That search should pull all publications that list haemoglobin as a tag, for all users of the site.
I intentionally used haemoglobin as a tag to illustrate that relevant tags need not be (and usually aren't) part of the text specified in the title of the article.
Further, the Plone "Collections" feature is not an adequate solution to this problem. Collections are typically generated by the admin. That means that a) admin intervention for something like this is essential and b) tags are best defined by users, not the admin.
When adding any content type (File, Folder, Page, Link, Collection, ...) in Plone, you can apply any number of tags to the content. This is done in the "Categorization" tab when editing/creating the content.
Visitors/Users can search the site based on tags like normal searches (using the search box or accessing the /##search URL).
Moreover you can use "tag cloud" portlets to visualise the tags' frequencies. Check the followings to get an idea:
1. A tag cloud portlet that rotates tags in 3D using a Flash movie
2. TagCloud
Don't forget to check Plone documentation, and specially Plone user manual to get yourself acquainted with the way Plone works.
#user2751530
I would like to know whether you are still working on this specific project - I am currently developing a similar one using plone v4, documentviewer v3 and an as of yet nonexistant frontend. I would like to discuss different approaches to the tagging-by-user problem, you can contact me through skype (dawitt19) or twitter (pref.) through #japhigu.
I am pretty new to opencart and I want to learn how can I create a more advanced search function.
For example I have products in my store, some of them are blue and some of them are red.
How can I specify or where I can specify a product's color (but not in the title, something like an attribute)?
And after that how can I search for red products?
I do not want to search by the keywords. I want a tab where to select the color and if I choose blue the search will show me all the blue products.
I hope you understand what I wish.(and can you please give me some code examples: where to add what to add to achieve what)
Thank you!
Normally, you would use Product Tags for this (field is under Product description on Product Page in Admin > Catalog > Products). You could have problems with very short tags 3 characters or less. See this post for more info:
mysql fulltext MATCH,AGAINST returning 0 results
You would add tags to your products like: red,black,brown,leather,s,m,l,xl small, medium, large
Then you could search any of the terms
[EDIT: in response to comment #1]
I would imagine that you just type multiple terms into search box:
'brown','large'
then all products that have (any? both?) of these tags returned.
You could use a Tag cloud or similar module to display tags on your pages, also you could use these terms in search field. If you search for 'brown', all products that have this tag will be returned.
You may also consider a third party extension for a more advanced search, check Opencart site's extension section.
If you want to modify/improve the search functionality yourself, you'll need to tinker with SQL queries in catalog/model/catalog/product.php
Opencart Search is considered by many to be one of the weak points of this package. There have been discussions on Opencart forums on this matter.
Just see how it works for you with the out-of-the-box setup, then if you need more functionality, look for an extension that does what you want, hire a programmer or code it yourself.
I am working on a project to digitize approximately 1 million images for which metadata will be added to facilitate search.
Each image is, for example, a page in a dictionary. But not text. Just a static scanned image. OCR is not an option :(
My objective is to emulate the current search procedure which consists of looking up the alphabetical entries till the correct page is found. In absence of machine readable text, I am looking at tagging each page with Dictionary range tag. For Example (Apple-Canada). So if someone searches for "Banana", it should hit the (Apple-Canada) range Tag.
Is this supported in SharePoint out of the box? If not, is there an addon product which provides this functionality or am I looking at building a customized extension?
Any help will be appreciated :)
Installing the IFilter for TIF files is done with a couple of clicks and gives you free OCR along the way. Very good for scanned pages.
On your question though: No, SharePoint does not have any kind of "range" tags or fields. The only vaguely similar thing to what you are requesting is the Thesaurus of the search. There you could define acronyms and synonyms for words and it would actually search for something else. So you could enter Banana but it would actually search for Apple. Some examples here: How to: Customize the Thesaurus in SharePoint Search and Search Server.
Other than that I can only think of a custom implemented search provider giving you the flexibility you need.
I was wondering what would be the best way to achieve a multi-language template based website. So say I want to offer my website in Englisch and German there are some different methods. My interest is mainly about SEO, so which would be the best way for search engines.
The first way that I often see is using different directories for each language, for example www.example.com for English and www.example.com/de/ for the German translation. The disadvantage of this is: when changing a file, ist has to be changed in every directory manually. And for search engines the two directories would be concerned as duplicate content, wouldnt they?
The second way I know is just using some GET value like www.example.com?lang=de and then setting a cookie. But this way search engines probably wont even find the different languages.
So is there another way or which one is the best?
I worked on internationalised websites until this year. The advice we always had from SEO gurus was to discriminate language based on URL - so, www.example.com/en and www.example.com/de.
I think this is also better for users; if i bookmark a page in German, then when i come back to it, i get a page in German even if my cookies have expired. Similarly, i can do things like post the URL on Facebook, and have my German-speaking friends click on it and get a site in German.
Note that if your site serves multiple countries, you should handle those along with language - so, you might have example.com/de-DE, example.com/en-GB, example.com/en-IE, etc.
However, this should not involve duplication. Instead, you should set your application up to process the URL, extract the locale information, and then forward the request internally to a locale-independent page. So, a request for example.com/de-DE/info and a request for example.com/en-IE/info should both be passed to /info.jsp (or i'm guessing info.php in your case). That page should then be coded to emit text in the appropriate language, using a page-level localisation mechanism.
Things are a bit trickier if you want the URLs themselves to be localised (eg example.org/de-DE/anmelden vs example.org/en-IE/sign-in). However, the same principle applies: extract the locale, then forward to a common page. The difference is that there must be more sophistication in figuring out what the page is from the URL; you will need a mapping from natural language in the URL to the page filename.