Project

General

Profile

Feature #4557

Add languages forlder and files for plugin

Added by Hubert Borderiou over 7 years ago. Updated about 7 years ago.

Status:
Feature implemented
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Start date:
27/03/2012
Due date:
% Done:

100%

Estimated time:
Complexity:
Normal
SCRUM pts - complexity:
?

Description

Hi,
I'm working on a plugin, and I cannot easily deals with translation of my plugin.
May be we can add langages files in the plugin directory.

For example, files french.php, english.php in a subfolder lang of the plugin :
plugin/my_plugin_name/lang/french.php


Related issues

Related to Chamilo LMS - Feature #4467: Add gettext supportNeeds more info11/03/2012

Actions
Related to Chamilo LMS - Feature #4575: Static pluginFeature implemented30/03/2012

Actions

Associated revisions

Revision be9d1b88 (diff)
Added by Julio Montoya over 7 years ago

Adding language support to plugins see #4557

History

#1

Updated by Julio Montoya over 7 years ago

I think that Laurent already did this in this task #4575

#2

Updated by Laurent Opprecht over 7 years ago

Indeed.
You will need to inherit from Plugin and use myplugin->get_lang().

I noticed a small bug when the the title is my_plugin_plugin - on _ in the plugin name.
For the moment I am correcting that manually by changing the name - see search_course_plugin for an example.

#3

Updated by Yannick Warnier over 7 years ago

  • Target version set to 1.9.2
#4

Updated by Laurent Opprecht over 7 years ago

  • % Done changed from 0 to 80
#5

Updated by Julio Montoya over 7 years ago

  • Status changed from New to Needs more info
  • Target version changed from 1.9.2 to 1.9 RC1

I added support to the get_lang function in the plugins when using twig or the classic index.php. I added language support to the hello_world and the show_user_info plugins.

#6

Updated by Julio Montoya about 7 years ago

  • Status changed from Needs more info to Feature implemented
  • % Done changed from 80 to 100

No complaints, so it should work well. Closing

Also available in: Atom PDF