I have problem with Google translate urls... On my website I put 3 linked flags - one in my language, others in english and german. Strukture of my flags:
<div class="language">
<img src="img/pl.png" alt="" />
<img src="img/en.png" alt="" />
<img src="img/de.png" alt="" />
</div>
When I translate website first time - everything is OK. But when I click flag on "translated" website Google wants to translate url from href, not my url... And I get error "URL is invalid"... Any solutions?
I would be glad for help! Thanks!
Related
I am asked to do the localization of an old project. I did all the text part.
But I am stuck on Images.
<img id="img78" src="~/images/f1/step.jpg" runat="server" alt="image2" width="267" />`
This is one of the image tag I am struggling to fix. I have different images for German and French.
This is in a UserControl. I have 3 different resource file on the LocalResources folder of the UserControl. All text fields are working.
This is due in 2 days. Any help would be appreciated. I am new to programming. This project is done in old asp.net.
Is it possible to set the src from LocalResourceFile.
I tried the following way but didn't work:
<img id="img78" src='~/images/<%= GetLocalResourceObject("step1") %>/step1_2.jpg' runat="server" alt="image2" width="267" />
My ResourceFiles are Activate.ascx, Activate.ascx.de, Activate.ascx.fr
ResoucefileEntry :- (Name)step1.Text
(value)g1
I need to change the url for <img src=>
for German as `src="~/images/g1/step.jpg"`
for French as `src="~/images/f1/step.jpg"`
for English as `src="~/images/e/step.jpg"` This is the default.
I am updating my online portfolio with a new website (I grabbed a template off Free-Css.com). When I preview it, it works fine. Once I deploy the website via Firebase, none of my images appear.
All of the images are in the public folder, which is where my hosting is set to. Here is an example of one of the images:
<div class="col-md-6 about-img-div">
<!-- <div class="about-border" data-aos="fade-up" data-aos-delay=".5"></div> -->
<img src="Headshot.jpg" width="400" class="img-responsive" alt="" align="right" data-aos="fade-right" data-aos-delay="0" />
Even if I use the pull pathname, the images still do not appear. Please note that they do appear if I just open the HTML file, but not while deployed. What am I doing wrong? Here is the website: https://evanmny.com
I'm not sure how you create/generate the HTML, but when I look at the network tab when loading your site in a browser I see it tries to read this URL:
https://evanmny.com/Users/evanmullen/Public/city.jpg
That should be:
https://evanmny.com/city.jpg
I want to embed an icon for my website. The relevant HTML shall retrieve it via "src=..." from a folder on my Google Drive. I have given the folder and also the image file public access rights. (Finally I want the HTML code to run on the Google platform as well but I can demonstrate the issue also with a locally stored HTML file.)
When I use the links to my folder or to the image file directly in my browser, they show up. I therefore think that there is no authority issue. Also when I use a reference to a copy of the image file on my local PC, it works.
The code below shows 4 cases. The first 2, referring to the locally stored file, work and the last 2, referring to the file on the Google drive, do not work.
<!DOCTYPE html>
<html>
<head>
Test on local PC
<br><br>
</head>
<body>
1. Image from same directory in which this html code resides
<br>
Method: src="test.png"
<br>
<img id="myImg" src="test.png" width="50" height="50">
<br>
2. Image from directory on local PC
<br>
Method: src="C:/Users/MattheisenP/Desktop/test.png"
<br>
<img id="myImg" src="C:/Users/MattheisenP/Desktop/test.png" width="50" height="50">
<br>
3. Image from directory on Google Drive using the drive's key
<br>
Method: src="https://drive.google.com/drive/folders/0B9P-4EpF1HhMXzdoQ2tJSXotVmc/test.png"
<br>
Using this url... https://drive.google.com/drive/folders/0B9P-4EpF1HhMXzdoQ2tJSXotVmc in the browser brings me to the folder
<br>
<img id="myImg" src="https://drive.google.com/drive/folders/0B9P-4EpF1HhMXzdoQ2tJSXotVmc/test.png" width="50" height="50">
<br>
4. Image from directory on Google Drive using the files key
<br>
Method: src= "https://drive.google.com/file/d/0B9P-4EpF1HhMb0trR1NXbVhXNTg"
<br>
Using this url... https://drive.google.com/file/d/0B9P-4EpF1HhMb0trR1NXbVhXNTg in the browser displays the icon
<br>
<img id="myImg" src="https://drive.google.com/file/d/0B9P-4EpF1HhMb0trR1NXbVhXNTg" width="50" height="50">
<br>
</body>
The outcome is as follows:
As you see, the last two fail. What is wrong with my syntax or my understanding of the concept?
Thanks for any helpful hint.
Now I found a syntax which works:
https://docs.google.com/uc?id= enhanced with the FileID. In the example above the statement
<img id="myImg" src="https://docs.google.com/uc?id=0B9P-4EpF1HhMb0trR1NXbVhXNTg" width="50" height="50">
gives the expected result and the icon is shown. So, the file ID was correct as well as the access rights. But the methods/syntax as proposed in several articles and used in case 3 and 4 above did not work (at least not for me). The syntax with https://docs.google.com/uc?id= provides the image as required.
I'm making a website and I have a button which open a google map from the user location to somewhere else.
<a href={'http://maps.google.com/maps?saddr=My+Location&daddr=Nexapp'} target="_blank">
//Button here
</a>
The problem is that My Location give me a random gym in the USA when I'm click on the link with Microsoft Edge. Here's a screenshot of the result The other browser are giving me my location though...
Anyone have an idea why and how to fix it?
EDIT:
Here's the code of my component (I'm using Reactjs)
<div id="content" className={styles.mapSection}>
<GoogleMap
latitude={46.829131}
longitude={-71.279030}
zoom={14}
width="100%"
height="100%"
marker={false}
mapOptions={mapOptions} />
<div className={styles.mapOverlay}>
<h1 className={`text ${styles.mapText}`}>
<FormattedMessage id="googleText" {...messages.googleText} />
<span className={styles.city}>
<FormattedMessage id="quebec" {...messages.quebec} />
</span>
</h1>
<a className={`link ${styles.mapButton}`} href="http://maps.google.com/maps?saddr=My+Location&daddr=Nexapp" target="_blank">
<ChevronRightButton mobile={mobile} text={<FormattedMessage id="locationButton" {...messages.locationButton} />} />
</a>
</div>
</div>
The <a> doesn't change but #Sampson wanted for code :P
I was unable to get "My Location" in any browser. Not sure if you previously allowed the browsers to view your location or what, but for me it did not work in IE or Chrome.
The only way I know to get a users location is to use the Google Maps API to find it:
https://developers.google.com/maps/documentation/javascript/basics?csw=1#DetectingUserLocation
I mask my domain name as I use my university free web hosting because I'm a poor student.
I have a link in my portfolio site to a Youtube video but it will not let me click on the link... the only way to open it is to right click and open in new window/tab.
How can I avoid this..?
The site is www.Grice95.co.uk and the link is in he far left 'CAMERA USE' icon.
Thanks Luke
You could try a hax like setting the href like this:
<a class="" href="https://www.youtube.com/v/_djf6rZ_0i4">
<img alt="" src="../images/large/cam-txtdriving.png">
<p>Text Driving - The Unwanted Outcomes (Intermediate)</p>
</a>
Or:
<a class="" href="https://www.youtube.com/watch?v=_djf6rZ_0i4&output=embed">
<img alt="" src="../images/large/cam-txtdriving.png">
<p>Text Driving - The Unwanted Outcomes (Intermediate)</p>
</a>
Or:
<a class="" href="https://www.youtube.com/embed/_djf6rZ_0i4">
<img alt="" src="../images/large/cam-txtdriving.png">
<p>Text Driving - The Unwanted Outcomes (Intermediate)</p>
</a>
The way around this is to get the iframe embed code and take the URL from there.
Taking this will redirect your youtube link to a full screen embed of your video that works whilst still retaining the masked url.
Thanks to 'thepio'