add my content layout

This commit is contained in:
smanylov
2026-01-15 12:27:39 +07:00
parent 719a3e3582
commit 7213e40b96
13 changed files with 257 additions and 30 deletions
+1 -9
View File
@@ -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;