Use code to find another translation of a DNN page to link to the correct language - dotnetnuke

i have a list view with a link to the detail view with 2sexycontent.
at the list view i created a tag for the link with href="#Content.Link"
this works for german, but at the other 4 languages i have a problem with the localization. cause the tabs have differet links and at the moment all the details links get redirected to the german detail view.
how can i find the link to the corresponding DNN page with the other language using the standard DNN API?
thanks
regards
michael

There are two options
in the entity translations, specify the other page (probably not sexy)
look up the dnn-page which is the translated one of the page you have
I believe you want to do #2. I don't have the code snippet for that at hand, but it should be easy to find it in google or stack-overflow. Just ask for "How to find a translated page in server code" or something like that. Would be great if you share the result.

Related

How to create a step-by-step tutorial for first-time visitors to a web page (React)?

Apologies if I don't explain this well, but I've seen something like this on certain websites (unfortunately can't think of an example right now).
Sometimes if I visit a website for the first time, the site will guide me through the entire document and highlight certain sections e.g., "Use this button here to add a new item" while the rest of the page is greyed out, and then you click Next step which takes you to the next feature, and so on.
It'll be somewhat similar to this (but styled nicer) :
Is there a way (or package) to do this with React?
I believe this feature is called Product Tours
This library can help you - https://github.com/gilbarbara/react-joyride
Also, I found an article using this library on Smashing Magazine - https://www.smashingmagazine.com/2020/08/guide-product-tours-react-apps/

Learning Drupal 7 and trying to understand themes and templates

I'm new to learning Drupal and I'm hoping someone can explain something to me. I'm trying to figure out how to change certain pages to have different template designs, for example one page can have a two column layout and one page can have a three column layout or one page can be a gallery.
Similar to this template from template monster.
http://www.templatemonster.com/drupal-themes/39996.html
So far all I have seen in terms of tutorials is just installing and setting up a theme and arranging the blocks around the site but nothing about changing templates.
I'm use to the way Wordpress does everything where with just one click in the dashboard you can change the template design of the page. If someone can explain how they differ and how they are similar that would be great!
Also if their is a good book on Drupal 7 please let me know.
Thanks!
Congratulations on beginning your trek into learning Drupal. It is, in my opinion, the best of the CMS's available today.
Drupal templates are controlled when logged in as a user with site administration in the 'Appearance' section. There, you can add a new theme or switch between those themes already installed on your site.
As for site themes displaying different page layouts depending on the which page you browse, as a general rule Drupal treats your home page differently than internal pages. Using modules such as the Pages module, you can control the appearance, layout and functionality of specific pages of your site.
There are a number of excellent books on Drupal 7 that cover basic as well as intermediate topics. My favorite is Drupal 7 Manual by David Ipswich.
Best of luck!

Internationalization and Localization in CakePHP 2.1

I am building a dual language app in CakePHP 2.1.x because of the great reviews of Cake's "built-in" localization features. However, I am wrestling with getting this powerful feature to work.
I know that this topic has been tackled for previous versions of Cake (here, here, here, and here), but it hasn't been solved for Cake 2.x. I am also referencing these articles in the cookbook (yes, I've read the manual):
http://book.cakephp.org/2.0/en/core-libraries/internationalization-and-localization.html
http://book.cakephp.org/2.0/en/core-libraries/behaviors/translate.html
Couple of things -- I do not want to do separate subdomains for each language. Instead, I prefer URL based language switching with the click of a button (in this case, a flag icon). The site will be actively maintained, so the content needs to update dynamically. Asking the client to maintain two separate sites/databases is out of the question.
I have Translate behavior set up for my PostModel, but I can't tell if it's working. I also initialized I18n by running I18n in the console, have confirmed the database tables exist, have set up my .po files, and have wrapped all my content in __(). However, when I change the default language in my browser to French, the site remains in English.
I've tried the P28n Component, but I think it's outdated for Cake 2.x. I also tried URL-based language switching based on this nuts-and-bolts-of-cakephp article, but apparently it's incompatible with the new CakePHP API.
Can anyone point me in the direction of a tutorial or instructions that work with CakePHP 2.x? One not already referenced here?
Update: I found this article: http://www.localizingjapan.com/blog/2011/11/10/localizing-a-cakephp-application/comment-page-1/#comment-7467. Does anyone know where you place the code for CakeSession::write('Config.language', 'fre'); and setlocale("LC_ALL", "fr_FR.utf8");?
Simply put the code in AppController::beforeFilter() and set the values based on however you retrieve the language, from a post request or a part of the URL.

CakePHP: Internationalizing a web application - Design and Examples?

I have a web application built using CakePHP framework and now I am in the process of internationalizing it. I started with the base set-up as outlined in the below article -
http://puskin.in/blog/2010/08/cakephp-manage-multiple-language-in-application/
and also add little bit of customization based on my previous question -
CakePHP: Internationalizing Web Application
To completely internationalize my web app, I would need to translate my drop-down/look-up content as well, like - categories, favorites, countries, bucket list etc.
What is the best way to design my tables and CakePHP samples? Can someone explain with a simple example and classes? Links or articles?
Lets say we have something like -
A user can create multiple posts, and each post has a category [science article, match article] etc in the drop-down and same we need to internationalize drop-down as well.
Two hints:
Read the manual of cakephp.
Look into the code of a available application (maybe croogo)
My open source project is translated.
It call CandyCane. A port of Redmine into CakePHP.
I also imported translation files from Redmine, so CandyCane supports numbers of languages from the beginning.
https://github.com/yandod/candycane
It might be helpful for you.

display a calendar function on lots of different websites

first of all, please excuse my ignorance, this is an exploratory question, rather than a specific programming program that needs solving.
I have a number of clients that have unique websites, none of which I was involved in developing. I would like them to be able to display a calendar of common events, but which would also contain events unique to them.
Is it possible using something like Server Side Includes to be able to give them a few lines of code which they could insert into their website (on any particular page) which might display a calendar type display, which their users can then interact with?
I guess I am looking for something similar to a Google calendar but I do not want to use a Google calendar. The key thing would be that they would only need to insert the few lines of code on one of their webpages; they wouldn't have to install any software on their servers.
Any suggestions?
Thanks
Damien
There are are all sorts of web calendars that will allow you to include them on a web page (typically using javascript, not SSI). Some are targeted at specific platforms (ie, Wordpress) and some are more generic.
Try searching "web calendar widget" for examples.
You'd have to put some amount of content on their site. If you can do that, you can include some javascript that will load more javascript from the server side that can do the bulk of the calendaring work for you.
You wouldn't be able to just drop a few files on the server and have them work, you'd need some way to link to them by changing the existing content on at least one of the pages.
I may be misunderstanding your question though.
If you are looking for specific recommendations on web calendar widgets, Arshaw's fullcalendar is my favorite to date.
It displays a great calendar that can be easily styled with css or jquery ui themeroller and is very programmable. The website has great documentation and examples as well.
Per using it on different sites, it supports that easily.
Note, I'm not affiliated with that calendar at all, just a satisfied customer.

Resources