Creating Multi Language Blog in Ghost CMS - content-management-system

I have been creating a blog in Ghost CMS, where I have to place a dropdown on the header to select the language (English, Chinese, Korean, Japanese).
I have read the possible way to do it, using dynamic routing as in the following URL,
URL: [https://docs.ghost.org/tutorials/multi-language-content/][1]
I have a query that, by using this way do I need to rewrite the content of the blog posts for each languages or not.
Does this method automatically convert the language if I publish the post in english?

There's not automatic language conversion in Ghost. You would need to create separate posts for each language. All dynamic routing gives you is a way to direct URL with a language-specific tag to a particular post.

Just thought I'd let you know that we've updated the tutorial you linked to on using different languages in Ghost: https://ghost.org/tutorials/multi-language-content/
The tutorial shows how to create multi-language content and to use <link> elements to add the alternative translations to the meta data. I've created a CodePen demo here on how to create a language select in JavaScript which hooks into those elements: https://codepen.io/daviddarnes/pen/QWwzePz

Yes. You have to write the content for each blog post and it will be separate by tag.
Example,
routes:
collections:
/:
permalink: /{slug}/
template: index
filter: 'tag:-fr'
/fr/:
permalink: /fr/{slug}/
template: fr
filter: 'tag:fr'
taxonomies:
tag: /tag/{slug}/
author: /author/{slug}/

Related

Using a template in struct plugin

The struct plugin is nice for managing structured data. But so far the only way I found to present the data for one single entry is a simple automatically generated table at the top of the page followed by the content of the entrys wiki text. Since I need the single entry pages to look better, I want to replace the simple table with something more pleasing to the eye like a template page that gets included into the page itself using {page>_mytemplate}.
The mytemplate wiki page might look like this:
==== STRUCTFIELD_TITLE ====
The STRUCTFIELD_NAME is a STRUCTFIELD_CLASSIFICATION consisting
of STRUCTFIELD_INGREDIENTS.
"STRUCTFIELD_*" should be replaced with the fields defined in the schema of course.
The wiki page of the single entry should include the template page as mentioned above with {page>mytemplate}.
So my question in essence is: How to include single fields of a schema into a wiki page as template variables, and can this be further automated using one "template wiki page" that gets included via the {page>...} command?
Found a solution. It is discussed in detail here: https://github.com/cosmocode/dokuwiki-plugin-struct/issues/145
In a nutshell: There is a version of the Struct plugin which includes all the functionality needed: https://github.com/iainhallam/dokuwiki-plugin-struct/tree/feature/value

Localization of personal page on GitHub. Which solution to choose?

I have a personal page on GitHub ( myusername.github.io ). I want to make several versions, EN (global), RU (local), etc. How is it better to implement?
The first thing that came to mind - just create index-XX.html, where XX - language ID, and then on all pages make a redirect to localized pages. But in this case I duplicating the same page. Of course, I did not plan to update the pages every day, but I want to make things right.
It depends on your framework.
With Jekyll/Octopress, you have octopress/multilingual
If you have not specified a permalink style, or if you are using one of Jekyll's default templates, your post URLs will change to include their language.
When using Jekyll's pretty url template, URLs will look like this:
/site_updates/en/2015/01/17/moving-to-a-multilingual-site/index.html
/site_updates/de/2015/01/17/umzug-in-eine-mehrsprachige-website/index.html
If you are using a static-site generator like Hugo, there is a Pull Request in progress
support having language switchers in templates, that know where the translated page is (with .Page.Translations)
(when you're on /en/about/, there's a "Francais" link that points to /fr/a-propos)

Many doubts about TYPO3 template system

I am very new in TYPO3 (I came from Joomla and WordPress) and I am having difficulties in understanding how templates are handled in TYPO3 (it seems to me that the situation is more complex in TYPO3 than it is in Joomla and in WordPress).
I have installed and I am testing this version of TYPO3 introductionpackage-6.1.3.zip
In Joomla and in WordPress a template simply is an HTML structure (which are marked in the various areas of the page where the CMS modules will be placed) and the related CSS settings.
In TYPO3 it seems to me that the situation is very different or am I wrong?
At this moment I am reading this section of the official documentation that references the default template of the TYPO3 Introduction Package: http://docs.typo3.org/typo3cms/GettingStartedTutorial/Templates/Index.html
The difference between static content and dynamic content of a website created using a CMS is pretty clear to me (this is not different from any others CMS like Joomla or WP)
Dynamic content: is something that is dynamically created by the CMS (executing some queries) as a menu (it look into a DB table and then a script renders the menu on the page)
Static content: is something that is fixed as the title of the website or a background image
Until now I think that it is pretty clear for me but I have many doubts when the documentation speaks about the Template Record as a way to implement the previous principle.
Here: http://docs.typo3.org/typo3cms/GettingStartedTutorial/Templates/%28%28generated%29%29/Index.html
it says that:
This is a control element that instructs TYPO3 how to handle a certain
branch of the page tree.
In particular with this image it shows how to modify these template records for the Introduction Package Template (Introduction Package is also the name of the template provided with this package or what?):
Then on this section on the documentation it says:
If you edit the template "Introduction Package" you will see that most
fields are empty. For each website you need a TypoScript template on
the ROOT level, in this case that is the "Introduction Package"
template. The TypoScript configuration of a website can be quite long
therefore it is possible to make many small TypoScript templates that
get included in the main template. For better maintenance, all
TypoScript of the Introduction Package has been put into the folder
'Typoscript Templates'. The only thing the "Introduction Package"
template does is to include the "ROOT" template that in turn includes
other templates.
And this is totaly obscure for me: I have understood that TypoScript is a configuration language that can be used to configure the frontend (so I think that I can use it to configure how my page will appear) but I can't understand the following assertions:
What does this mean: For each website you need a TypoScript template on the ROOT level, in this case that is the "Introduction Package" template ? I have installed TYPO3 Introduction Package and I have only a web site !!! What is the ROOT level of the website? Is it the Welcome to TYPO3 node in the List section Tree? So in pracatice I am assigning a specific template to the root of a website and this is used in all subnodes (all the pages as Home, About TYPO3, Features, etc)?
What does it mean when it says: For better maintenance, all TypoScript of the Introduction Package has been put into the folder 'Typoscript Templates'. Where is this folder? I don't have it.
What does it mean when it says: The only thing the "Introduction Package" template does is to include the "ROOT" template that in turn includes other templates.?
Tnx so much
Andrea
The root level of your website is the page called Home. It also has the globe instead of a normal page icon, because the flag Use as root page is set in the page properties under behavior.
When you access a page in TYPO3 CMS, then it will walk up the rootline until it finds a root page with a template record. In this case, it is indeed a record called Introduction Package, but what is more important, is that this is a record of the type template.
OK, so far we have found a template for your request. Now TypoScript comes into play. On a normal request, the template engine will search for an object named page which is (usually) of the type PAGE. Thus the most simple template is:
page = PAGE
page.10 = TEXT
page.10.value = <h1>Hello World</h1>
Which just prints Hello World on your website.
What happens next depends on your template approach chosen (marker base, automaketemple+marker, templavoila, fluid, fedext, ...). That means that TYPO3 CMS does not just have one template approach (or one kind of template), but is extensible and very flexible, as you can combine them.
In the Introduction Package uses the automaketemplate+markers approach. This includes a ready HTML template, automatically creates blocks based on certain rules and then replaces those blocks with dynamic content.
OK, where do you find the configuration for this?
The actual template file is fileadmin/default/templates/introduction_package_site_structure_template.html.
The TypoScript configuration is in fileadmin/default/TypoScript. There you can find a file called setup.ts. It includes all other TypoScript files. There are various folders, e.g. menu for the menu definition, block for the dynamic blocks, etc.
The configuration of automaeketemplate is in Extension/AutomakeTemplate/setup.ts.
The sections defined with the help of automaketemplate are replaced in Page/setup.ts.
The full TypoScript defines a tree structure of objects with their configuration. You can view the full parsed template with either the Template Analyzer or the TypoScript Object Browser which you find in the template tools in the dropdown select box on top of the module.
The separation of the TypoScript into several files is done by the purpose of the configuration inside the files. This is meant for easy maintenance and not for easy learning. You can always use the Template Analyzer to see the full template that is generated out of the fragments and the TS Object Browser to see what kind of configuration tree this results in.
This might sound a bit difficult at first, especially compared to the primitive template systems of other products, however it gives you great possibilities that are yet easy to maintain, even if you do major updates.
It is great to see that people decide to use TYPO3. In my point of view the biggest difference to WordPress, Drupal...
is the strict separation between HTML and dynamic logic, witch can be TypoScript/userFunc or Fluid logic...
and even this makes TYPO3 so powerful. nothing against WordPress, Drupal... ect. but to use PHP in templates is especially for updates a dangerous thing to do.
I am always impressed whats possible with TYPO3. "I cant do it" is not valid for TYPO3. TYPO§ always has a way.
It is indeed a hard way through to learn all the corners of TYPO3 but it is worth.
Keep doing it and you will succeed
Ludwig
Great to hear you also wanna use TYPO3 as a CMS.
To understand the TYPO3 CMS better, i think you can better begin from scratch, meaning download the source + dummy package and install it on your server, or maby download a wamp package.
Currently I use Fluid to build my templates. For the part outside TYPO3 its much like Joomla, just create one or more HTML files, with some special markers.
The other parts, which are in TYPO3, may be some more difficult now, and it would take a lot of time to explain that here, so i'll refer to a tutorial made by Thomas Deuling:
http://thomas.deuling.org/2011/06/create-a-complete-typo3-website-by-using-the-fluid-template-engine/
You might wanna join the TYPO3 mailing list for italy, found at http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-ug-italy.
Furthermore, the TYPO3 website is filled with documentation, although sometimes out of date its still usefull. Also you might wanna take a look at the TYPO3 certified integrator program. There you can find all the basics to become a master at TYPO3.
Please feel welcome to the community, TYPO3 is inspiring people to share!
Kind regards,
Jeroen
Hi i wrote a little starter ts time ago.. maybe helps you
Remember in TYPO3 there are many ways to solve things!..
gl
Setup:
config {
baseURL = http://www.bla.com/
prefixLocalAnchors = all
meaningfulTempFilePrefix=1
doctype=xhtml_trans
htmlTag_langKey=de
remove_defaultJS=external
inlineStyle2TempFile=1
disablePrefixComment = 1
linkVars=L
sys_language_uid=0
language=en
locale_all = en_EN.UTF-8
xmlprologue = none
}
page = PAGE
page.typeNum = 0
page.bodyTag=<body>
page.10=TEMPLATE
page.10 {
template = FILE
template.file = fileadmin/templates/template.html
workOnSubpart = DOCUMENT
subparts {
CONTENT=COA
CONTENT.10<styles.content.get
}
}
File: template.html
<!-- ###DOCUMENT### -->
<!-- ###CONTENT### -->CONTENT<!-- ###CONTENT### -->
<!-- ###DOCUMENT### -->

Converting content pages to tt_news (Typo3)

On a website, I have a section where I put a new page every week. I'd like to convert this to a system using tt_news. How do you suggest me to import the pages (more than 100 pages) to tt_news? Can I do it using a simple SQL query, or should I write a custom PHP script to perform the importation? Is there already an extension that exists that could help me performing this task?
It doesn't really matter to me if I simply build news liked to existing pages, or if I transfer the content of the page to the content of the news. It would be great if I can convert the page title to the news publish date, but I could use the page publishing date as well.
What do you suggest for performing this task?
I would do it via SQL as you mentioned already. Could get tricky if you have multiple content-elements per page that needs to be merged into one tt_news-dataset.
You could also install an extension, that links tt_content-elements with tt_news-records. This way you only have to insert the tt_news-records by traversing the pages and link the content per page to the new tt_news-record. Here are some extension, that link tt_news with content-elements:
ttnews_irre
aba_ttnews_content_con
Here is also an extension that could be worth a look: content2news.
Hope this is useful to you.
Best regards,
Peter

Multiple citation standard

We know that there are standards that if some site implements them it will be compatible with zotero.
Is there any standard for multiple scrapping?
Which standard should be implemented by site developers in search result page?
Re-posted from the Zotero forum:
unAPI (preferred) and COinS both work with multiple items.
The other methods don't work for search results.
As an example for unAPI see e.g. inSpire:
http://inspirehep.net/search?p=citedby%3Aauthor%3Aellis+-refersto%3Aauthor%3Awitten
An example for COinS on search pages there's e.g. Harvard's new Hollis catalog:
http://hollis.harvard.edu/