Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Translate to Russian

Started by Muut Archive 11 years ago · 12 replies · 697 views
11 years ago

Thank you for the excellent CMS. Please help me find where i can change the text like Continue Reading SimpleSearch, the name of the month (for example, JUL)? I need to translate them into Russian.

11 years ago

You will have to change those things in the twig templates for the theme. I can't tell you exactly which file, because it really depends on the theme you are using.

11 years ago

Thanks for answer. I use blog site skeleton.

11 years ago

I would just poke through the antimatter/templates/ twig files and translate as needed.

11 years ago

Also review the templates of the plugins (like the ones in user/plugin/simplesearch/templates if you can't find them in your theme templates, and copy them there to make the changes.

11 years ago

Hi
It is also one of my first asking, but for french language
What will happen if I update the theme or a plugin, i will keep my modifs ?
possible to create custom twig file ?
thanks

11 years ago

If you want or have modified the twig files of your theme you should check this to create a child theme of the theme you are using instead of making changes directly in the folder: http://getgrav.org/blog/theme-development-with-inheritance
Usually when you update a theme or plugin, all custom changes in css and templates get overwritten. Now, with the advent of the Admin Panel plugin, I think the css changes get written into a custom.css file that is kept even if the theme is updated but I don't think that happends with .twig files. I hope this helps. :)

11 years ago

It will depend on your theme and the plugin you are using for the search. Asuming you are using SimpleSearch (if you started with the blog skeleton you probably are), then you need to modify this template. Copy it and save it in your theme directory templates/partialfolder. Instead of placeholder="Search..." at line 1 of the file you could use, for example, placeholder={{ "SEARCH.PLACEHOLDER"|t }}... and add a languages.yaml to your theme directory with the translations for the variable like this:

YAML
fr:
  SEARCH.PLACEHOLDER: "Search translation to french"

More instructions on translating here: From this section onwards.

11 years ago

Thanks and Thanks
the trick of
placeholder={{ "SEARCH.PLACEHOLDER"|t }}...
should be in the plugin ?

11 years ago

Not in the plugin folder, because it would be overwritten when you update the plugin. If you created a custom theme (by using inheritance, for example), put it twig file in the templates/partials/ folder in your theme folder.

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1336 9 years ago
Archive · by Muut Archive, 9 years ago
2 925 9 years ago
Archive · by Muut Archive, 9 years ago
2 4056 9 years ago
Archive · by Muut Archive, 9 years ago
1 2941 9 years ago
Archive · by Muut Archive, 9 years ago
3 1112 9 years ago