2 people following this project (follow)

Project Description

LocalL is A localization library designed to be extremely flexible and fit multiple use paradigms. LocalL has direct bindings to TextWriter Objects and WinForms controls. It also has indirect bindings that allow it to work with WPF, while still being compatible with Mono.

Status

LocalL is in very early alpha stages. So far the primary features are coded in, and it compiles, but it is untested. It requires the http://configfilemanager.codeplex.com/ library to work. A copy is enclosed in the repository to save some potential headaches.

Current Features
Feature Description *Status
Translate Translate whole internationalized strings to local strings Testing
Don't Translate Allow strings to specified as 'do not translate', so the algorithm will pass them through without translation Testing
TextWriter Bindings Write to a targeted or encased text writer object Testing
GDI Write to a GDI control presenting a 'String Text' property Testing
Dynamic Targets Write to any target exposing certain methods/properties, regardless of inheritance Coded
Dynamic Translators Use of abstract classes to allow changing the functionality without having to re-write all 'write' functions. Coded
Overrideable Dynamic Targets Dynamic Target code is abstract in the base class, allowing alternative implementations Testing
Compiles in Visual Studio The project compiles in Visual Studio 2010 Complete

* May be "Coded", "Testing", "Complete"

To Do
Task Description Priority
Do Translate Add a DoTranslate prefix, so DoNotTranslates don't need to be mangled very high
Search and Replace Search for internationalized strings in a large block of text, and replace with localized strings high
Compiles in Mono The project compiles in Mono 2.10.x or higher, and can run in Mono. This should be possible now, but it is not tested. high
Tie-in to online translators Use babelfish, google translate, etc. to dynamically translate text. Low priority because, while useful, this is not a good practice low

FAQ

Why not use another localization tool?

There are a lot of localization tools out there. Many of them are simple, easy to use, and may fit your project better than this too. Also at the time of writing this, this tool is in it's alpha stages. If a tool fits better, or is better tested, then that's a good reason to use it over this tool. However, this tool is geared towards flexibility. You should use this tool over others if the flexibility and ease of use it provides, outweighs that available from the other tools. In particular:
  • A variety of API specific outputs, including TextWriter objects and Windows Forms.
  • Generic Access - A generic output API, compatible with things like WPF and other custom targets. No need to inherit from any specific class/interface.
  • Generic Access - If you want to make it even easier to output to something, you can write a TextWriter derived class to output to that target, making localization to that type of object even easier (you save one argument in most function calls).
  • Extensibility - you can replace the translator functionality without having to re-write the whole library, to match your specifications.
  • Familiarity - The API is based off of TextWriter (in fact, this is a TextWriter implementation), with extensions that add functionality, while remaining similar to TextWriter in convention.

Changelog

Version 0.1.3
  • Translation Builder / Test tool built.
  • Access of individual localized strings in a dictionary-like manner


Version 0.1.1
  • Version 0.1.2 included here
  • Primary interface classes LocalL.ALocalizer, LocalL.Localizer, LocalL.Quick.L
  • DefaultLocalization string property - get/set the default localization to use in Write/WriteLine functions
  • Output TextWriter property - get/set the default output TextWriter
  • string[][] Load(params string[] files) - load localizations from the listed file paths
  • void Save(string file, string localization) - save the specified localization to a particular file path
  • bool requires_translate(ref string s) - check if s requires translation, if not, remove the do not translate prefix.
  • void Translate(...) and void Translate_(...) - which can be overwritten to change how localization is executed
  • Write(...) and WriteLine(...) - which write to a user defined TextWriter
  • Write(TextWriter, ...) and WriteLine(TextWriter, ...) - which write to a targeted text writer
  • Write(System.Windows.Forms.Control, ...) and WriteLine(System.Windows.Forms.Control, ...) - which write to a targeted WinForms control
  • void WriteToGeneric(object o, string s) - write to a generic object, checking for specific methods/properties/etc in the object, can be overridden
  • void WriteGeneric(object c, ...) void WriteLineGeneric(object c, ...) - use WriteToGeneric to implement TextWriter like functions to a generic object

Copyright

Note: Codeplex only displays the standard 3 clause BSD license. This library does not require the third clause.

COPYRIGHT NOTICE
Copyright (c) 2011, S James S Stapleton
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Last edited Dec 18 2011 at 1:01 AM by jimstapleton, version 10