WordPress.org

Ready to get started?Download WordPress

Forums

Codestyling Localization
[resolved] warning about ambiguous language directory (2 posts)

  1. pgn4web
    Member
    Posted 2 years ago #

    when I try Codestyling Localization on my plugin, I get a warning that the language folder is ambiguous and I get prompted to pick the language folder from a list.

    How can I avoid that warning?

    the textdomain is defined in the plugin with
    load_plugin_textdomain( 'embedchess', null, dirname(plugin_basename(__FILE__)) . '/lang' );

    the lang folder is currently empty, does this matter?

    http://wordpress.org/extend/plugins/codestyling-localization/

  2. codestyling
    Member
    Plugin Author

    Posted 2 years ago #

    Yes, you can prevent it even if my plugin can't evaluate the correct folder. This can be done by placing a translation template inside the language folder. The name of the file should be:

    embedchess-xx_XX.pot

    The files content should be the result of a fresh scan process, so only the untranslated full content should be inside. But it's also enough, if the file only contains a valid pot header like this taken from the WordPress Importer's *.pot file:

    # Copyright (C) 2011 WordPress Importer
    # This file is distributed under the same license as the WordPress Importer package.
    msgid ""
    msgstr ""
    "Project-Id-Version: WordPress Importer 0.5\n"
    "Report-Msgid-Bugs-To: http://wordpress.org/tag/wordpress-importer\n"
    "POT-Creation-Date: 2011-07-16 15:45:12+00:00\n"
    "MIME-Version: 1.0\n"
    "Content-Type: text/plain; charset=UTF-8\n"
    "Content-Transfer-Encoding: 8bit\n"
    "PO-Revision-Date: 2010-MO-DA HO:MI+ZONE\n"
    "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
    "Language-Team: LANGUAGE <LL@li.org>\n"

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.