If want to use a language file just for your plugin, the language file you create should be named after the plugin. The usual convention for plugins, if I'm right is this:
plg_[group]_[plugin_name].ini (for the .sys.ini file the convention is the same)
Besides, if you want to load another language file, you could do something like this:
Code: Select all
JFactory::getLanguage()->load( 'com_componentname', [ROOT_FOLDER] )
Where [ROOT_FOLDER] is usually JPATH_ROOT or JPATH_ADMINISTRATOR, depending on where you have your language file ( for plugins, the usual place, at least in recent Joomla versions, is in the administrator. Besides, make sure the file you created is fully UTF-8 encoded!
I hope it helps!