Guestbook/comments

Permalink 1 user found helpful
How can i change the language of the fields in the standard guestbook/comment block?
Now everything is in English but i'm from Holland so duth would be nice...

 
pvernaglia replied on at Permalink Reply
pvernaglia
Have you looked at the Language Manager Add on?http://www.concrete5.org/marketplace/addons/language-manager... It does a nice job assisting in adding new languages to C5.
admin replied on at Permalink Reply
It's not free....
admin replied on at Permalink Reply
Were are the source files of this located, does anyone know?
Maybe i can customize them there
Ekko replied on at Permalink Reply
Ekko
public_html/concrete/blocks/guestbook
admin replied on at Permalink Reply
Yes, i found that already but can't find the specific lines that i have to change... If i place a guestbook on a page and open that page in Dreamweaver i can see those line to change.

Maybe it's a option to save the page and upload it to the website.
But i can't find location of all the page files i made in concrete...
adajad replied on at Permalink Best Answer Reply
adajad
concrete5 is a database driven CMS which will not store the actual pages on the server but instead store all content in a database. The themes and templates used by concrete5 can be considered the front-end holding your chosen blocks, which in turn pulls their content from the database.

Now that being said I think I can help you with translating just the guestbook block (instead of your whole installation).

There are several ways you can do this, but the one below I think will be the best for you:

Create a custom template:
Custom templates are just that - custom. You can apply a custom template to a block to render a different view of the block without ever touching the underlying functions of the block. In your case that would be translating all text into Dutch.
The first thing you need to do is to copy view.php and view.css from 'webroot/concrete/blocks/guestbook' to 'webroot/blocks/guestbook/templates/dutch'. You will have to create the directories yourself.

Now open up view.php from 'webroot/blocks/guestbook/templates/dutch' in a simple text editor with utf-8 encoding. You will now see the code used to render the view of the guestbook. To translate from English to Dutch you need to change the wordings inside the echo statements like below:

From:
<?php echo t('Edit')?>

into:
<?php echo t('Bewerken')?>


Continue with all echo statements and you should be good. Now I don't know Dutch (translation above from Google Translate) so I can't help you with the actual translation.

Once you have changed all echo statements you need to save the file and make sure it is saved in 'webroot/blocks/guestbook/templates/dutch' where you also have a file named view.css (copied before, if you remember).

To apply your translation you need to login to your site and edit your guestbook block. Click on your block and choose 'Custom Template'. In the dropdown list you should now be able to select a template called 'Dutch', which was what you named your template folder above.

I hope this helps.

Good luck!
admin replied on at Permalink Reply
Yes, that's it, it's working!
Accept for the messages you receive if there's an error.
When you don't fill out the complete form for example.
Dose will still be in English.

But the important ones are now in Dutch.

I had to put the "view" files in the directory of the theme and that one is not in the "concrete" map were all the other files are.

Thanks for the good how to, Adajad, it was very clear and easy to understand.
adajad replied on at Permalink Reply
adajad
I'm glad you got it working! As for the error messages I think those are in the controller.php file. I don't have access to a computer so unfortunately I can not check (on the phone right now).
admin replied on at Permalink Reply
Yes in that file i can see the things i would't like to see in Dutch.
But which of the two do i need?
The one in the theme file or the one of the standard guestbook file in the concrete file?
because i tested it but or it didn't work or my page didn't work correct anymore...
Maybe i did something wrong when translating...
adajad replied on at Permalink Reply
adajad
I can give you more input tomorrow, but in the meantime make sure you clean both your browser and site cache between changes.

To clear site cache, just type 'clear cache' in the intelligentsearch and you will find it. To clear your browser cache hit Shift+F5 or Ctrl+F5 (depending on browser) a few times.