n8n/packages/cli/src/TranslationHelpers.ts

9 lines
266 B
TypeScript
Raw Normal View History

2021-11-15 02:19:43 -08:00
import { join, dirname } from 'path';
/**
* Retrieve the path to the translation file for a node.
*/
export function getTranslationPath(nodeSourcePath: string, language: string): string {
return join(dirname(nodeSourcePath), 'translations', `${language}.js`);
}