Advertisement:

Author Topic: New theme - how to change text/messages  (Read 2239 times)

nilcontact

  • Premium
  • Newbie
  • *****
  • Posts: 32
New theme - how to change text/messages
« on: July 07, 2011, 02:07:07 pm »
hello
I am creating new theme - so that I can customise label/messages. I am able to create new theme as per instruction in wiki and Activate it from Admin panel.

However one thing I am not able to figure out is - How to change messages(help messages and text that appears on buttons). I am new to PHP and was able to find .po and .mo files, but really dont know how to make change. Chaning .po doesn't bring any change on pages.
Thanks

garciademarina

  • Administrator
  • Hero Member
  • *****
  • Posts: 974
Re: New theme - how to change text/messages
« Reply #1 on: July 08, 2011, 12:24:01 pm »
Hi,
For update the messages is need change the text in php files, but need too update the .po file where are the translation.
All stings into functions __(), _e() and _m() are string that will be translated and appear in .po files.

When code and po are updated the strings, you need generate the .mo file ( compiled .po )

You may need poedit for edit the .po files, and finally, the .po files are compiled into binary .mo files with msgfmt.

PS: theme.po only theme strings ./oc-content/themes/modern/ you only should need modify this file