#PB_Compiler_IDE_Language

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
Regenduft
Enthusiast
Enthusiast
Posts: 121
Joined: Mon Mar 02, 2009 9:20 pm
Location: Germany

#PB_Compiler_IDE_Language

Post by Regenduft »

It would be nice to have a "#PB_Compiler_IDE_Language" constant or simply "#PB_Compiler_Language" together with the corresponding constants "#PB_Language_English", "#PB_Language_French", "#PB_Language_Spanish" and "#PB_Language_German". This might come in handy when working in a multi lingual team or when posting code on the different PureBasic forums.

Code: Select all

CompilerIf #PB_Compiler_Debugger = #False
  
  CompilerIf #PB_Compiler_Language = #PB_Language_German
    CompilerError "Bitte mit aktiviertem Debugger kompilieren"
    
  CompilerElse
    CompilerError "Please compile with activated debugger"
    
  CompilerEndIf
  
CompilerEndIf
On one hand it is not absolutely necessary to have this constant, but on the other hand it should be really easy to be implanted, because there is already the environment variable pentant "PB_TOOL_Language" (which unfortunately can only be used in selfmade IDE tools and cannot be used with "CompilerIf").

At the moment, the first line in my (multi lingual) codes has to be one of the following lines (IMHO this scheme is quite intuitive):

Code: Select all

#PB_Compiler_Language = 'en' ; english
#PB_Compiler_Language = 'fr' ; french
#PB_Compiler_Language = 'es' ; spanish
#PB_Compiler_Language = 'de' ; german
A M S
User
User
Posts: 58
Joined: Fri Aug 14, 2009 2:26 pm
Location: Afghanistan

Re: #PB_Compiler_IDE_Language

Post by A M S »

+1 :D
Post Reply