diff options
author | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-02-18 22:51:44 +0000 |
---|---|---|
committer | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-02-18 22:51:44 +0000 |
commit | 1412d579cee890318673beace9f707a50ded65e6 (patch) | |
tree | d65ceefe0a75e35ff9470083267bb4b717d16072 /src/corelib/gfx_constants.pas | |
parent | 43a7485a26c632820262c2856ae10054986e8ada (diff) | |
download | fpGUI-1412d579cee890318673beace9f707a50ded65e6.tar.xz |
* Added a new gfx_constants unit which will be used as the start of localization in fpGUI.
* I created some basic language include files, but I'm not sure what is the best way to go ahead yet.
Diffstat (limited to 'src/corelib/gfx_constants.pas')
-rw-r--r-- | src/corelib/gfx_constants.pas | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/corelib/gfx_constants.pas b/src/corelib/gfx_constants.pas new file mode 100644 index 00000000..e723f674 --- /dev/null +++ b/src/corelib/gfx_constants.pas @@ -0,0 +1,43 @@ +{ + Constants used throughout fpGUI will be defined here. This includes + language constants for localization. For now, localization is very simplistic + and done at compile time. At a later date we can autodetect and autoselect + the correct language resource at runtime. + + GetText might also be a better option. +} +unit gfx_constants; + +{$mode objfpc}{$H+} + +interface + +resourcestring + +{ Define Compiler language symbol (eg: gr for German) to include the correct + language resource file otherwise the Default (English) resource file will + be used. } + +{.$DEFINE gr} // German +{.$DEFINE ru} // Russian +{.$DEFINE fr} // French +{.$DEFINE pt} // Portuguese + + +{$IF defined(gr)} + {$I lang_german.inc} +{$ELSEIF defined(ru)} + {$I lang_russian.inc} +{$ELSEIF defined(fr)} + {$I lang_french.inc} +{$ELSEIF defined(pt)} + {$I lang_portuguese.inc} +{$ELSE} + {$I lang_english.inc} +{$IFEND} + + +implementation + +end. + |