I am clearly missing the picture here as just about everything I try is just failing miserably. I have languages as follows:
gb-en - UK English (path = /gb/en/about )
us-en - US English (path = /us/en/about )
us-es - US Spanish (path = /us/es/about )
I have an about page located at /about. If I translate and assign the links above, two things go wrong:
If I go to the translate page, and say I want to translate it to "US-ES", then the link becomes:
us/es/node/add/page?translation=6&target=us-es --> which does not exist (page not found)
If I add the language switcher, and switch to the US-ES page that it has found, it also says "page not found".
Something is causing everything to say "page not found" and I have fiddled with just about everything in the settings and it just doesn't work.
What am I missing?
Could it perhaps be because I am using prefixes with slashes? I.e. us/en and us/es etc?
The i18n module does not work if you set the prefix as A/B, only as A. In other words, you can have this:
/us-en
But not this
/us/en
Which is really annoying and I wish it didn't work this way, or that someone at least added validation so you can be told not to do this on the settings page.
Related
I just started trying to use shield.io badges today. I'm a little confused.
When I needed to use the C++ logo in a label I used the following request:
https://img.shields.io/badge/C++-%2300599C.svg?&style=for-the-badge&logo=c%2B%2B&logoColor=white
Which yielded a label with a logo, as intended.
I expected it to be logo=c-plus-plus and through trial and error I eventually found out that I should use the encoding for the + sign, %2B.
Now I can't find the logo for Selenium, although it is clearly on the simple-vector list (https://simpleicons.org/icons/selenium.svg) and there's nothing odd about this name, no spaces or signs, so I don't know how to find it. logo=selenium should work but it doesn't.
This is what I'm trying:
https://img.shields.io/badge/selenium-%2343B02A.svg?&style=for-the-badge&logo=selenium&logoColor=white
And what I get is a label without logo.
Any thoughts?
PS: I don't have enough reputation to post images so I can't include the resulting images in the text but you can copy the link to see what I mean.
You should follow the url structure fully https://img.shields.io/badge/<LABEL>-<MESSAGE>-<COLOR>. The color property seems wrong.
For Selenium logo request could be like this (without message)
https://img.shields.io/badge/selenium-43B02A.svg?&style=for-the-badge&logo=selenium&logoColor=white.
The parameter for the C++ logo should be cplusplus and the color should be 00599C like https://img.shields.io/badge/C++-00599C.svg?&style=for-the-badge&logo=cplusplus&logoColor=white
https://shields.io/
https://simpleicons.org/
The link that you pasted gives the link now correctly with image
Github link which has most of the shields that you people would require
Issue with JSON LD CODE
To start with I am trying to use this code in weebly, buy using embed code option and then I click on the edit custom HTML and enter this code. However, after entering this nothing shows up as in the recipe is not shown on the page and a blank page is shown.
this code is picked on schema.org, for recipes.
Could anyone please help me out in what exactly went wrong. I really appreciate your assistance. FYI- I am new to this. I am trying to set up my own food website and and wanted to schema to for SEO improvement. Any other suggestions are welcome. Thanks in advance.
Please refer this link for the JSON-LD CODE. IT WILL BE AT THE END OF THE PAGE. https://schema.org/Recipe
When you add a JSON-LD block in the HTML, it doesn’t change anything visibly on the page. The script element is hidden by default in all browsers, and you typically want to keep it like that (users typically have no interest in your JSON-LD code).
To check if adding the JSON-LD worked correctly, open the page in a browser and check the source code of the page. You should see the script element with your JSON-LD.
You have to add the content (that should be visible to your users) regularly with HTML. The JSON-LD exists next to your content (duplicating the data like name, photo URL etc.), it doesn’t replace your content.
Sorry this will be a super newbie question.
In the default.ctp layout file, towards the beginning there are two lines.
$cakeDescription = __d('cake_dev', 'CakePHP: the rapid development php framework');
$cakeVersion = __d('cake_dev', 'CakePHP %s', Configure::version())
I've found the function for __d here which says it "Allows you to override the current domain for a single message lookup." I don't really understand what it means at all.
Additionally, I was able to do the same thing without throwing any errors by simply replacing the lines with
$cakeDescription = 'CakePHP: the rapid development php framework';
$cakeVersion = 'CakePHP ' . Configure::version();
Its used for making your application multilingual.
You can use the command Console/cake i18n extract to extract all the text strings(which is the second parameter in __d()) into a pot file, which you can then translate.
See this for more information about __d() https://book.cakephp.org/2.0/en/core-libraries/internationalization-and-localization.html#internationalizing-cakephp-plugins
And see this for more information about extracting the strings into pot files
https://book.cakephp.org/2.0/en/console-and-shells/i18n-shell.html
I have a web application with some "Help" buttons which point to my online documentation. The links to the help sections are hardcoded in the app database. Previously, the documentation was made in HTML and JS, and I could control the URLs to the section manually.
However, now that I am migrating to Sphinx and ReST, I found the automatic section URL generation great, but cannot figure out how to control this behaviour for my structure.
Is there a way to have a sort of URL alias which point to the actual URL of my documentation in order not to update the hardcoded links in the app db everytime I update the name of my chapters/sections?
For instance:
I have a subsection called "I like apples" in Chapter 1.
My hardcoded link to it would be something like
"Chapter1#I-like-apples" (I only care about the part following the #
sign)
I change the title to "I hate apples". The new link would become "Chapter1#I-hate-apples", but in my db I still need to have "#I-like-apples" which point to the same section.
See Hyperlink Targets in the docutils documentation, specifically "internal hyperlink targets".
.. _my-target:
.. _synonym-to-my-target:
My Subsection
-------------
Sphinx will generate targets for each synonym.
You could also do indirect hyperlink targets.
.. _my-target: synonym-to-my-target_
.. _synonym-to-my-target:
My Subsection
-------------
There is one page (content type => basic page) where all links must be absolute, not relative.
It is a template used by a 3rd party.
If relative, for ex. the css is not loaded.
Howto?
You can use
global $base_url
drupal_get_path('theme', 'THEME_NAME');
It returns the path without slashes in front or after.
That's the type first, then the project name
drupal_get_path('module', 'name_of_module');
I reverse that enough (and then get confused as to why it isn't working) that i felt it worth documenting here, so the 'doh!' moment of realization comes sooner...
The valid types are as listed:
module
theme
profile
theme_engine
I can't think of any others and i can't even think of a reason to use the last one.