Single/dual-wavelength switchable bidirectional Q-switched all-fiber laser using a bidirectional fiber polarizer.