WordPress.org

Ready to get started?Download WordPress

Forums

how to include files in plugins (3 posts)

  1. Net-lunden
    Member
    Posted 6 years ago #

    How do i control if a specific file exist in my plugin sub-folder?

    I plan to make a language file in danish an a default i english.

    so the question is how do i in practice make the following?

    if ( file_exist(WPLANG ."mo")) {
      include WPLANG ."mo";
    } else {
      include "en_EN.mo";
    }
  2. moshu
    Member
    Posted 6 years ago #

    I think you should consider adding localization options like described in this post:
    http://boren.nu/archives/2004/11/01/localizing-plugins-and-themes/

  3. Net-lunden
    Member
    Posted 6 years ago #

    I have looked at the article, but unfortunately didn't get it.

    I should include this in the plugin:
    load_plugin_textdomain('myplugin');

    but how do i use it?

    i have no problem in including the files, it is only the exists-part

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.