feat: update translation guide and configuration for Indonesian language support
This commit is contained in:
@@ -117,7 +117,16 @@ export const languageNames: Record<SupportedLanguage, string> = {
|
|||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
### Step 4: Test Your Translation
|
### Step 4: Update Vite Configuration
|
||||||
|
|
||||||
|
In `vite.config.ts`, ensure the new language is included in the build:
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
// Add 'fr' to the language regex
|
||||||
|
const langMatch = url.match(/^\/(en|de|zh|vi|it|fr)(\/.*)?$/);
|
||||||
|
```
|
||||||
|
|
||||||
|
### Step 5: Test Your Translation
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Start the dev server
|
# Start the dev server
|
||||||
|
|||||||
@@ -40,7 +40,6 @@ BASE_URL=/pdf-tools/ npm run build
|
|||||||
2. Create the folder in Hostinger:
|
2. Create the folder in Hostinger:
|
||||||
- Go to **File Manager** → **public_html**
|
- Go to **File Manager** → **public_html**
|
||||||
- Create a new folder: `pdf-tools`
|
- Create a new folder: `pdf-tools`
|
||||||
|
|
||||||
3. Upload all contents of `dist` to `public_html/pdf-tools/`
|
3. Upload all contents of `dist` to `public_html/pdf-tools/`
|
||||||
|
|
||||||
## Step 3: Create .htaccess File
|
## Step 3: Create .htaccess File
|
||||||
@@ -64,7 +63,7 @@ RewriteBase /
|
|||||||
Header always set X-XSS-Protection "1; mode=block"
|
Header always set X-XSS-Protection "1; mode=block"
|
||||||
Header always set Referrer-Policy "strict-origin-when-cross-origin"
|
Header always set Referrer-Policy "strict-origin-when-cross-origin"
|
||||||
Header always set Permissions-Policy "geolocation=(), microphone=(), camera=()"
|
Header always set Permissions-Policy "geolocation=(), microphone=(), camera=()"
|
||||||
|
|
||||||
# REQUIRED for soffice.js (SharedArrayBuffer)
|
# REQUIRED for soffice.js (SharedArrayBuffer)
|
||||||
Header always set Cross-Origin-Opener-Policy "same-origin"
|
Header always set Cross-Origin-Opener-Policy "same-origin"
|
||||||
Header always set Cross-Origin-Embedder-Policy "require-corp"
|
Header always set Cross-Origin-Embedder-Policy "require-corp"
|
||||||
@@ -161,8 +160,8 @@ RewriteCond %{REQUEST_FILENAME} -d
|
|||||||
RewriteRule ^ - [L]
|
RewriteRule ^ - [L]
|
||||||
|
|
||||||
# Language routes
|
# Language routes
|
||||||
RewriteRule ^(de|en|zh|vi)/(.*)$ /$2 [L]
|
RewriteRule ^(en|de|zh|vi|it|id)/(.*)$ /$2 [L]
|
||||||
RewriteRule ^(de|en|zh|vi)/?$ / [L]
|
RewriteRule ^(en|de|zh|vi|it|id)/?$ / [L]
|
||||||
|
|
||||||
# ============================================
|
# ============================================
|
||||||
# 5.5. DOCS ROUTING (VitePress)
|
# 5.5. DOCS ROUTING (VitePress)
|
||||||
@@ -181,7 +180,7 @@ RewriteCond %{REQUEST_FILENAME} !-f
|
|||||||
RewriteCond %{REQUEST_FILENAME} !-d
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
RewriteRule ^ /index.html [L]
|
RewriteRule ^ /index.html [L]
|
||||||
|
|
||||||
ErrorDocument 404 /index.html
|
ErrorDocument 404 /index.html
|
||||||
```
|
```
|
||||||
|
|
||||||
## Subdirectory .htaccess Example
|
## Subdirectory .htaccess Example
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ http {
|
|||||||
root /usr/share/nginx/html;
|
root /usr/share/nginx/html;
|
||||||
index index.html;
|
index index.html;
|
||||||
|
|
||||||
rewrite ^/(en|de|zh|vi|it)/(.*)$ /$2 last;
|
rewrite ^/(en|de|zh|vi|it|id)/(.*)$ /$2 last;
|
||||||
|
|
||||||
location ~* \.html$ {
|
location ~* \.html$ {
|
||||||
expires 1h;
|
expires 1h;
|
||||||
|
|||||||
Reference in New Issue
Block a user