Home
Name Modified Size InfoDownloads / Week
NetTextEdit-1.0.2-setup.exe 2014-10-18 436.1 kB
NetTextDLL.dll 2014-10-18 18.9 kB
NetTextScanner-1.0.1-setup.exe 2012-12-11 420.4 kB
Readme-NetText.txt 2012-12-11 5.2 kB
NetText.xml 2012-12-11 8.0 kB
Totals: 5 Items   888.6 kB 0
NetText: gettext simplified work-alike for VB.NET
Requirements:
    .NET 2.0

This is, in my opinion, the best way to internationalize your application SIMPLY.
The conversion process is simple, the development process is simple. There are some
major features missing here, notably bidirectional support. Maybe that will be
addressed in a future version (by someone else..?)

This is a partial work-alike of GNU gettext (http://www.gnu.org/software/gettext/)
It is simplified to an extreme, but it is still useful - certainly more useful
than having no i18n at all because it's too much trouble!

INSTALL:

   For .NET, copy the DLL to the project root folder, and add it to the project.
   For COM, copy the DLL to any folder (usually system32) and register it as a COM DLL.

USAGE:

 * Developers:

      Insert user interface strings directly in your code. No need to create
      resource strings tables etc. Just wrap any user interface strings which need
      to be international with the sT_() function! Any strings inside a call to
      sT_() will be extracted into a template translator's file (using an external
      application, or simple grep). sT_() is easy to use and adds formatting
      features; you will find developing with NetText a pleasure.

      Sample pseudo-code:

         SetMenuText MenuID:=CTX_OPENFOLDER, Caption:=sT_("Open &Parent Folder")

         MsgBox (sT_("Are you sure you want to delete '%1'?", filename), [...]

      You can use the formatting features without translation by calling sExp();
      this is for error messages which need to be relayed to tech support verbatim.

      Sample pseudo-code:

         Err.Raise sExp("Error at line %1 accessing '%2': %3", _
                         lineno, filename, Err.Description)

      Special codes in message strings:

		  - embed a value (sprintf-like) with code like "%1" 
			  syntax = %index, where index is a number from 1 to 9

		  - format a value with code like "%{1...}" 
			  syntax = %{index[,alignment][:formatString]}
			  (see .NET docs for String.Format, but note index is 1-based, 
			  not 0-based like String.Format)
		  
		  - embed a carriage return with "%n"
		  
		  - embed a tab character with "%t"
		  
		  - enter "comment" mode with "%z"; any text after "%z" will not
			be shown in the program; often seen as %z//comment
		  
		  - escape literal "%" characters by doubling, ie "%%"
		  
      The only other thing needed is a call to sT_Init() on startup, to load the
      translated strings. sT_Init() normally needs no arguments.

 * Translators:

      You can edit the template file with any text editor.
      Sample translation-file entry: (translating to bad Spanish);
      note source code is included for context. The NetText package includes
      a translation-file editor which may make your work easier.

          ; E:\Projects\vb\_root\D-F\FindInFiles\v-1.7\Find3c.frm(2414)
          ; CTX_LVW_OPENFOLDER, sT_("Open &Parent Folder"), _
          msgid "Open &Parent Folder"
          msgstr "Abra del &Padre"
          
      Testing: simply save your work in progress as directed below and run the program.

 * Deployment:

      Assuming you are using the default path, you place the translation file(s)
      in the "Lang" directory under the application install directory; each file
      must be named "<language>.po2" (or "<language>-po.txt" if you prefer);

      Example: if language is "es", save translation file as
		  "<App.Path>\Lang\es.po2")

      You can override the default language by adding a text file named "language.ini" 
      in the "Lang" directory, and adding the following text:
	      language=## 
	  where ## = any ISO 639-1 two-letter language code.
	  http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
	  
      See "language[SAMPLE].ini" included with this distribution.
	      
 * Note:
 
     I haven't tested for international character set issues at all!  

SUPPORT:

    support site not set at this writing; use your Internet search engine

APPRECIATION:

    This is an extremely simplified work-alike of GNU gettext.
    gettext is copyrighted by the Free Software Foundation, Inc.
    http://www.gnu.org/software/gettext/
    It is hoped a fully compatible version can be developed to bring
    gettext to more developers, or this project can be folded into GNU gettext.

copyright 2012 Lindsay Bigelow (aka raffriff aka XyKyWyKy)

 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation, either version 3 of the License, or
 (at your option) any later version.

 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.

 You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.
Source: Readme-NetText.txt, updated 2012-12-11