mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-30 20:21:12 -06:00 
			
		
		
		
	 0558b53493
			
		
	
	
		0558b53493
		
	
	
	
	
		
			
			The XS was left only for the unit / integration tests, and it links libslic3r only. No wxWidgets are allowed to be used from Perl starting from now.
		
			
				
	
	
		
			18 lines
		
	
	
	
		
			608 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
	
		
			608 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| #ifndef slic3r_I18N_hpp_
 | |
| #define slic3r_I18N_hpp_
 | |
| 
 | |
| #include <string>
 | |
| 
 | |
| namespace Slic3r {
 | |
| 
 | |
| namespace I18N {
 | |
| 	typedef std::string (*translate_fn_type)(const char*);
 | |
| 	extern translate_fn_type translate_fn;
 | |
| 	inline void set_translate_callback(translate_fn_type fn) { translate_fn = fn; }
 | |
| 	inline std::string translate(const std::string &s) { return (translate_fn == nullptr) ? s : (*translate_fn)(s.c_str()); }
 | |
| 	inline std::string translate(const char *ptr) { return (translate_fn == nullptr) ? std::string(ptr) : (*translate_fn)(ptr); }
 | |
| } // namespace I18N
 | |
| 
 | |
| } // namespace Slic3r
 | |
| 
 | |
| #endif /* slic3r_I18N_hpp_ */
 |