add my content layout
This commit is contained in:
@@ -1,14 +1,6 @@
|
||||
'use client'
|
||||
|
||||
export const pluralize = (number: number, one: string, few: string, many: string) => {
|
||||
const getCurrentLang = () => {
|
||||
if (typeof window !== 'undefined') {
|
||||
return document?.documentElement?.getAttribute('lang') || 'ru';
|
||||
}
|
||||
return 'ru'; // значение по умолчанию для сервера
|
||||
}
|
||||
const currentLang = getCurrentLang();
|
||||
|
||||
export const pluralize = (number: number, one: string, few: string, many: string, currentLang: string) => {
|
||||
if (currentLang === 'ru') {
|
||||
const n = Math.abs(number) % 100;
|
||||
const n1 = n % 10;
|
||||
|
||||
Reference in New Issue
Block a user